#include <bits/stdc++.h>
using namespace std;
long long prime[100];
int main() {
  long long n, ans = 1, k = 0;
  scanf("%I64d", &n);
  for (long long i = 2; i * i <= n; i++)
    if (!(n % i)) {
      prime[k++] = i;
      while (!(n % i)) n /= i;
    }
  for (long long i = 0; i < k; i++) ans *= prime[i];
  printf("%I64d\n", ans * n);
  return 0;
}
