#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  set<long long> pf;
  while (n > 1) {
    long long ol = n;
    for (long long i = 2; i * i <= n; i++) {
      if (n % i == 0) {
        pf.insert(i);
        while (n % i == 0) {
          n = n / i;
        }
      }
    }
    if (n == ol) {
      pf.insert(n);
      n = 1;
    }
  }
  if (pf.size() == 1) {
    cout << *pf.begin() << endl;
  } else {
    cout << 1 << endl;
  }
}
