#include using namespace std; typedef long long ll; signed main(){ ll X; cin >> X; int np = 0; for( int i = 2; 1LL * i * i <= X; ++i ) np |= X % i == 0; if( not np ) cout << X << endl, exit( 0 ); ll Y = 1LL; for( int i = 2; 1LL * i * i <= X; ++i ){ if( X % i == 0 ){ int cnt = 0; while( X and X % i == 0 ) ++cnt, X /= i; if( cnt & 1 ) Y *= i; } } cout << Y << endl; return 0; }