#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,a,b) for(int i=a;i<(int)b;i++) #define rep(i,n) REP(i,0,n) #define all(c) (c).begin(), (c).end() #define zero(a) memset(a, 0, sizeof a) #define minus(a) memset(a, -1, sizeof a) #define minimize(a, x) a = std::min(a, x) #define maximize(a, x) a = std::max(a, x) using ll = long long; int const inf = 1<<29; int main() { ll x; cin >> x; map mp; for(ll i=2; i*i<=x; i++) { while(x % i == 0) { x /= i; mp[i]++; } } ll ans = 1; for(auto& e: mp) { if(e.second % 2) { ans *= e.first; } } cout << ans << endl; return 0; }