#include <bits/stdc++.h>
using namespace std;
vector<long long> prime;
vector<long long> factors;
void sieve() {
  bool flag[1000005];
  memset(flag, 0, sizeof(flag));
  flag[1] = 1;
  for (int i = 4; i < 1000005; i += 2) {
    flag[i] = 1;
  }
  for (int i = 3; i <= sqrt(1000005); i += 2) {
    if (flag[i] == 0) {
      for (int j = 2 * i; j < 1000005; j += i) flag[j] = 1;
    }
  }
  for (int i = 2; i < 1000005; i++) {
    if (flag[i] == 0) {
      prime.push_back(i);
    }
  }
}
void factorize(long long n) {
  long long sqrtn = sqrt(n);
  for (int i = 0; i < prime.size() && prime[i] <= sqrtn; i++) {
    if (n % prime[i] == 0) {
      while (n % prime[i] == 0) {
        n /= prime[i];
        factors.push_back(prime[i]);
      }
      sqrtn = sqrt(n);
    }
  }
  if (n != 1) {
    factors.push_back(n);
  }
}
int main() {
  sieve();
  long long n;
  cin >> n;
  factorize(n);
  set<long long> s;
  set<long long>::iterator it;
  for (int i = 0; i < factors.size(); i++) {
    s.insert(factors[i]);
  }
  long long ans = 1;
  for (it = s.begin(); it != s.end(); it++) {
    ans *= *it;
  }
  cout << ans << endl;
}
