#include <bits/stdc++.h>
using namespace std;
int prime[1000000];
bool status[1000100];
int pos;
void sieve() {
  int i, j;
  for (i = 0; i < 1000100; i++) {
    status[i] = false;
  }
  int sq = sqrt(1000100);
  for (i = 4; i <= 1000100; i += 2) {
    status[i] = true;
  }
  for (i = 3; i <= sq; i += 2) {
    if (status[i] == false) {
      for (j = 2 * i; j <= 1000100; j += i) {
        status[j] = true;
      }
    }
  }
  status[1] = true;
  pos = 1;
  for (int z = 1; z <= 1000100; z++) {
    if (status[z] == false) {
      prime[pos++] = z;
    }
  }
}
int main() {
  sieve();
  long long n;
  while (cin >> n) {
    long long ans = 1;
    for (int i = 1; i < pos; i++) {
      if (n == 1) break;
      bool f = false;
      while (n % prime[i] == 0) {
        f = true;
        n /= prime[i];
      }
      if (f) ans *= prime[i];
    }
    if (n > 1) ans *= n;
    cout << ans << "\n";
  }
  return 0;
}
