#include <bits/stdc++.h> using namespace std; const int N=1005; int n,cnt[N]; int main(){ long long n; while (cin>>n){ long long ans=1; for (long long i=2;i*i<=n;++i){ if (n%i==0){ while (n%i==0){ n/=i; } ans *= i; } } if (n!=1) ans *= n; cout<<ans<<endl; } return 0; }