#include <bits/stdc++.h>
using namespace std;
unsigned long long n;
unsigned long long A[30];
int main() {
  cin >> n;
  unsigned long long d = 2, b = floor(sqrt(n));
  while (n && d <= b) {
    if (n % d == 0) {
      n /= d;
      A[++A[0]] = d;
      while (n && n % d == 0) n /= d;
    }
    d++;
  }
  if (n) A[++A[0]] = n;
  unsigned long long ans = 1;
  for (int i = 1; i <= A[0]; i++) ans *= A[i];
  cout << ans << endl;
  return 0;
}
