#include <bits/stdc++.h>
using namespace std;
set<long long> s;
void solve(long long n) {
  while (n % 2 == 0) {
    s.insert(2LL);
    n /= 2;
  }
  long long i;
  for (i = 3; i * i <= n; i += 2) {
    while (n % i == 0) {
      s.insert(i * 1LL);
      n /= i;
    }
  }
  if (n > 2) s.insert(n);
}
int main() {
  long long i, j, k, l, m, n;
  cin >> n;
  long long ans = 1LL;
  solve(n);
  for (auto it : s) ans *= it;
  cout << ans << endl;
  return 0;
}
