#include using namespace std; typedef long long ll; #define REP(i, n) for(int(i)=0;(i)<(n);++(i)) #define in(T,V) T V;cin>>V; vector > pdecomp(ll n){ vector > res; int e = 0; while(n % 2 == 0){ n /= 2, e++; } if(e) res.push_back(make_pair(2,e)); for(ll p = 3; p*p <= n; p += 2){ int e = 0; while(n % p == 0){ n /= p, e++; } if(e) res.push_back(make_pair(p,e)); } if(n != 1) res.push_back(make_pair(n,1)); return res; } int main(){ in(ll,x); vector > p = pdecomp(x); ll res = 1; for(auto v : p){ if(v.second % 2) res *= v.first; } cout << res << endl; }