#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long divi[500005], cnt = 0;
int main() {
  long long n;
  cin >> n;
  long long sqr = sqrt(n + 1);
  for (long long i = 2; i <= sqr; i++) {
    if (n % i == 0) divi[++cnt] = i, divi[++cnt] = n / i;
  }
  divi[++cnt] = n;
  long long gd = n;
  for (long long i = 1; i <= cnt; i++) gd = gcd(gd, divi[i]);
  cout << gd << '\n';
  return 0;
}
