#include using namespace std; using ll = long long; using ul = unsigned long; using ull = unsigned long long; void primeFactorize(ll n, vector >& pf) { for (ll a = 2; a * a <= n; ++a) { if (n % a != 0) continue; ll ex = 0; while (n % a == 0) { ++ex; n /= a; } pf.push_back({ a, ex }); } if (n != 1) pf.push_back({ n, 1 }); } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll x; cin >> x; vector > pf; primeFactorize(x, pf); ll res{ 1 }; for (const auto& it : pf) if (it.second & 1) res *= it.first; cout << res << "\n"; return 0; }