#include <bits/stdc++.h>
long long min_div(long long);
int main() {
  long long n, x;
  std::cin >> n;
  x = min_div(n);
  if (x == n)
    std::cout << n;
  else {
    long long t = n;
    while (t % x == 0) t /= x;
    std::cout << (t == 1 ? x : 1);
  }
  return 0;
}
long long min_div(long long x) {
  long long i = 2;
  while (i * i <= x) {
    if (x % i == 0) return i;
    ++i;
  }
  return x;
}
