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