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