#include #include #include #include #include using namespace std; #define REP(i, N) for(i = 0; i < N; ++i) typedef long long ll; void solve() { int x; cin >> x; unordered_map primes; for (ll i = 2; i * i <= x; ++i) { while (x % i == 0) { primes[i]++; x /= i; } } if (x != 1) primes[x] = 1; ll ans = 1; for (auto&& i: primes) { if (i.second % 2) { ans *= i.first; } } cout << ans << endl; } int main(int argc, char const* argv[]) { cin.tie(0); ios::sync_with_stdio(false); solve(); return 0; }