#include <bits/stdc++.h>
using namespace std;
long long pc(long long a) {
  long long res = 1;
  int cnt = 0;
  while (a % 2 == 0) {
    a /= 2;
    cnt = 1;
  }
  if (cnt > 0) res *= 2;
  long long x = a;
  for (int i = 3; i <= sqrt(x) + 1; i += 2) {
    cnt = 0;
    while (a % i == 0) {
      a /= i;
      cnt = 1;
    }
    if (cnt > 0) res *= i;
  }
  if (a != 1) res *= a;
  return res;
}
int main() {
  long long a;
  cin >> a;
  long long res = 1;
  res = pc(a);
  cout << res;
  return 0;
}
