#include using namespace std; using ll = long long; #define rep(i, s, e) for (int i = (int)s; i < (int)e; ++i) #define all(a) (a).begin(),(a).end() vector> prime_factorize(ll n) { vector> res; for (ll i = 2; i * i <= n; i++) { if (n % i != 0) continue; ll ex = 0; while (n % i == 0) { ex++; n /= i; } res.push_back(make_pair(i, ex)); } if (n != 1) res.push_back(make_pair(n, 1)); return res; } int main() { cin.tie(nullptr); ll X; cin >> X; vector> primes = prime_factorize(X); ll ans = 1; rep(i, 0, primes.size()) { if (primes[i].second % 2 == 1) ans *= primes[i].first; } cout << ans << '\n'; }