#include <bits/stdc++.h>
using namespace std;
long long n;
vector<long long> prime;
bool isprime(int x) {
  for (int i = 0; i < (int)prime.size() && prime[i] * prime[i] <= x; i++)
    if (x % prime[i] == 0) return false;
  return true;
}
int main() {
  cin >> n;
  for (int i = 2; i <= 1000000 && i * i <= n; i++) {
    if (isprime(i)) {
      long long dob = (long long)i * i;
      prime.push_back(i);
      while (n % (dob) == 0) {
        n /= i;
      }
    }
  }
  cout << n << endl;
  return 0;
}
