#include <bits/stdc++.h>
using namespace std;
bool isprime[5000005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  memset(isprime, true, sizeof(isprime));
  isprime[1] = false;
  long long n;
  cin >> n;
  long long m = ceil(sqrt(n));
  queue<long long> v;
  for (long long i = 2; i <= m + 5; i++) {
    if (isprime[i]) {
      for (long long j = i * i; j <= m; j += i) {
        isprime[j] = false;
      }
      v.push(i);
    }
  }
  long long ans = 1;
  while (!v.empty()) {
    long long r = v.front();
    v.pop();
    if (n % r == 0) {
      ans *= r;
    }
    while (n % r == 0) {
      n /= r;
    }
  }
  ans *= n;
  cout << ans;
}
