#include using namespace std; int main(){ long long X; cin >> X; long long ans = 1; int count; for(long long i=2;i*i<=X;i++){ count = 0; while(X%i == 0){ count ++; X /= i; } if(count%2 == 1) ans *= i; } if(X != 1) ans *= X; cout << ans << endl; return 0; }