#include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); long long x; cin >> x; map p_fac; for(int i = 2; i * i <= x; i++) { while(x % i == 0) { p_fac[i]++; x /= i; } } if(x != 1) p_fac[x]++; long long ans = 1; for(auto i : p_fac) { if(i.second % 2 == 1) ans *= i.first; } cout << ans << endl; return 0; }