#include <bits/stdc++.h>
using namespace std;
vector<int> primes;
vector<bool> isPrime;
void sieve(int N) {
  isPrime.assign(N + 1, true);
  isPrime[0] = isPrime[1] = false;
  for (int i = 2; i <= N; i++) {
    if (isPrime[i]) {
      primes.push_back(i);
      if (1LL * i * i <= N)
        for (int j = i * i; j <= N; j += i) isPrime[j] = false;
    }
  }
}
unordered_set<long long> primeFactors(long long N) {
  unordered_set<long long> factors;
  for (long long p : primes) {
    if (p * p > N) break;
    while (N % p == 0) {
      N /= p;
      factors.insert(p);
    }
  }
  if (N > 1) factors.insert(N);
  return factors;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  sieve(10000000);
  long long n;
  cin >> n;
  auto ansFactors = primeFactors(n);
  long long ans = 1;
  for (auto i : ansFactors) ans *= i;
  cout << ans << '\n';
  return 0;
}
