#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  while (scanf("%lld", &n) != EOF) {
    for (long long i = 2; i * i <= n; i++) {
      if (n % i) {
        continue;
      }
      while ((n / i) % i == 0) {
        n /= i;
      }
    }
    printf("%lld\n", n);
  }
  return 0;
}
