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