#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { cin.tie(nullptr)->sync_with_stdio(false); ll x; cin >> x; vector> pf; for (ll i = 2; i * i <= x; i++) { if (x % i == 0) { ll cnt = 0; while (x % i == 0) { x /= i; cnt++; } pf.push_back({ i, cnt }); } } if (x > 1) { pf.push_back({ x, 1 }); } ll ans = 1; for (auto [p, e] : pf) { if (e % 2 == 1) ans *= p; } cout << ans << '\n'; return 0; }