#include <bits/stdc++.h>
using namespace std;
long long prime(long long n) {
  long long count = 0;
  long long ans = 1;
  while (n % 2 == 0) {
    n = n / 2;
    count++;
  }
  if (count > 0) ans = ans * 2;
  count = 0;
  for (long long i = 3; i * i <= n; i = i + 2) {
    count = 0;
    while (n % i == 0) {
      count++;
      n = n / i;
    }
    if (count > 0) ans = ans * i;
  }
  if (n > 1) ans = ans * n;
  return ans;
}
int main() {
  long long n;
  cin >> n;
  long long k = prime(n);
  cout << k;
  return 0;
}
