#include <bits/stdc++.h>
using namespace std;
bool Av[1000005];
int Q[1000005], m;
long long n;
void Eratos() {
  m = 0;
  for (int i = 2; i <= 1000000; i++)
    if (!Av[i]) {
      int j = 2;
      m++;
      Q[m] = i;
      while (i * j <= 1000000) {
        Av[i * j] = true;
        j++;
      }
    }
}
int main() {
  Eratos();
  cin >> n;
  long long Res = 1;
  for (int i = 1; i <= m; i++) {
    if (n % Q[i] == 0) {
      Res = Res * (long long)Q[i];
      while (n % Q[i] == 0) {
        n = n / Q[i];
      }
    }
    if (n == 1) break;
  }
  if (n > 1) Res = Res * n;
  cout << Res << endl;
  return 0;
}
