#include using namespace std; typedef long long ll; int main(void){ ll x; cin >> x; ll ans = 1; for(ll i=2; i <= sqrt(x); i++){ ll cnt = 0; while(x%i == 0){ x /= i; cnt++; } if(cnt%2 == 1){ ans *= i; } } cout << ans << endl; return 0; }