#include <bits/stdc++.h>
using namespace std;
const int MAXI = 1005000;
long long n;
vector<long long> first;
int prime[MAXI];
void criba() {
  memset(prime, 0, sizeof(prime));
  for (int i = 4; i < MAXI; i += 2) prime[i] = 2;
  for (int i = 3; i * i < MAXI; i += 2) {
    if (!prime[i]) {
      for (int j = i * i; j < MAXI; j += 2 * i) {
        prime[j] = i;
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  criba();
  for (int i = 2; i < (int)MAXI; i++)
    if (!prime[i]) first.push_back(i);
  int lim = first.size();
  cin >> n;
  for (int i = 0; i < (int)lim; i++) {
    long long s = first[i] * first[i];
    while (n % s == 0LL) n /= first[i];
  }
  cout << n << '\n';
  return 0;
}
