#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define llong long long int main() { llong x; cin >> x; int limit = (int)sqrt(x) + 1; llong result = 1; for(int i=2; i<=limit; i++) { bool flg = false; while(x % i == 0) { x /= i; flg = !flg; } if(flg) result *= i; } cout << result * x << "\n"; }