# include using namespace std; typedef long long ll; ll x, cnt, s, y; int main() { scanf("%lld", &x); s = sqrt(x); y = 1; for (ll i = 2; i <= s; i++) { cnt = 0; while (x % i == 0) cnt++, x /= i; if (cnt & 1) y *= i; } if (x > 1) y *= x; printf("%lld\n", y); return 0; }