#include <bits/stdc++.h>
using namespace std;
bool is(long long n) {
  if (n <= 3) return true;
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
vector<long long> v;
int main() {
  long long n;
  cin >> n;
  if (is(n))
    cout << n;
  else {
    long long cnt = 0;
    for (long long i = 2; i * i <= n; i++) {
      if (n % i == 0) {
        v.push_back(i);
        if (i * i != n) v.push_back(n / i);
      }
    }
    long long ans = v[0];
    for (int i = 1; i < v.size(); i++) ans = gcd(ans, v[i]);
    cout << ans;
  }
}
