#include using namespace std; typedef long long ll; signed main(){ ll X; cin >> X; 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; }