#include #include #include #include using namespace std; int main() { long long int x,n; vector > ans; cin >> x; n = 2; while (x != 1){ int cnt = 0; while (!(x%n)){ x = x / n; cnt++; } if (cnt){ ans.push_back(make_pair(cnt, n)); } n++; } long long int y=1; for (int i = 0; i < ans.size(); i++){ if (ans[i].first % 2){ y *= ans[i].second; } } cout << y << endl; return 0; }