#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
const long long maxm = 1e12 + 10;
const int inf = 1e9;
const long long mod = 1e9 + 7;
int getint() {
  char c;
  while ((c = getchar()) && !(c >= '0' && c <= '9') && c != '-')
    ;
  int ret = c - '0', sgn = 0;
  if (c == '-') sgn = 1, ret = 0;
  while ((c = getchar()) && c >= '0' && c <= '9') ret = ret * 10 + c - '0';
  if (sgn) ret = -ret;
  return ret;
}
int main() {
  long long n;
  while (cin >> n) {
    long long m = sqrt(n + 0.5);
    long long ans = 1;
    for (long long i = 2; i <= m; i++) {
      if (n % i == 0) {
        ans = ans * i;
        while (n % i == 0) n /= i;
      }
    }
    ans = ans * n;
    cout << ans << endl;
  }
  return 0;
}
