#include <bits/stdc++.h>
using namespace std;
vector<unsigned long long> res;
unsigned long long gcd(unsigned long long a, unsigned long long b) {
  return b == 0 ? a : gcd(b, a % b);
}
int main() {
  unsigned long long n;
  unsigned long long ans;
  cin >> n;
  for (unsigned long long i = 2; i * i <= n; i++)
    if (n % i == 0) {
      res.push_back(i);
      while (n % i == 0) n /= i;
    }
  if (n != 1) res.push_back(n);
  ans = ((res.size() == 0) ? 1 : res[0]);
  for (int i = 1; i < res.size(); i++) ans = gcd(ans, res[i]);
  cout << ans << endl;
}
