#include using namespace std; int main() { long x, y = 1; cin >> x; for (long i = 2; i * i <= x; i++) { int n = 0; while (x % i == 0) { n++; x /= i; } if (n % 2 == 1) y *= i; } cout << y << endl; }