#include #define ll long long using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define rrep(i, n) for (int i = 1; i <= n; i++) ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; } ll lcm(ll a, ll b) { return (a * b) / gcd(a,b); } using P = pair ; ll MOD = 1000000007; ll INF =1<<29; int main() { int n; cin >>n; int MI = INF; int m=n; for(int i = 2;i*i<=n;++i){ while(m>=1&&m%(i*i)==0){ m/=(i*i); } } cout << m << endl; }