#include <bits/stdc++.h>
using namespace std;
template <typename Tp>
void read(Tp &x) {
  x = 0;
  char ch = 1;
  long long fh;
  while (ch != '-' && (ch > '9' || ch < '0')) ch = getchar();
  if (ch == '-')
    ch = getchar(), fh = -1;
  else
    fh = 1;
  while (ch >= '0' && ch <= '9')
    x = (x << 1) + (x << 3) + ch - '0', ch = getchar();
  x *= fh;
}
long long n;
vector<long long> v;
signed main() {
  read(n);
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      v.push_back(i);
      while (n % i == 0) n /= i;
    }
  }
  if (n > 1) v.push_back(n);
  if (v.size() == 1)
    cout << v[0] << endl;
  else
    cout << 1 << endl;
  return 0;
}
