#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, p, res = 1;
  scanf("%I64d", &n);
  if (n % 2 == 0) {
    res *= 2;
    while (n % 2 == 0) n /= 2;
  }
  p = 3;
  for (; p * p <= n; p += 2) {
    if (n % p == 0) {
      res *= p;
      while (n % p == 0) n /= p;
    }
  }
  if (n > 1) res *= n;
  printf("%I64d\n", res);
  return 0;
}
