#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T abs(T t) {
  return t < 0 ? -t : t;
}
const long long modn = 1000000007;
inline long long mod(long long x) { return x % modn; }
const int MAXN = 212345;
map<int, int> pai;
map<int, int> sz;
vector<int> pri;
int mrk[1123456];
long long n, m, k;
int main() {
  int on;
  scanf("%lld", &n);
  on = n;
  vector<long long> div;
  for (int a = 2; a <= 1000000; a++) {
    if (!mrk[a]) pri.push_back(a);
    for (long long b = a; b * a <= 1000000; b++) mrk[b * a] = 1;
  }
  for (long long p : pri) {
    if (n % p == 0) {
      while (n % p == 0) n /= p;
      div.push_back(p);
    }
  }
  if (n > 1) div.push_back(n);
  if (div.size() == 1)
    printf("%lld\n", div[0]);
  else
    printf("%lld\n", 1ll);
}
