#include <bits/stdc++.h>
using namespace std;
const long long INF = LONG_LONG_MAX;
const long long NINF = LONG_LONG_MIN;
const long long mmod = 1000000007;
int32_t main() {
  long long n;
  cin >> n;
  vector<long long> facts;
  for (long long i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      n /= i;
      facts.push_back(i);
    }
  }
  if (n > 1) facts.push_back(n);
  facts.resize(unique((facts).begin(), (facts).end()) - facts.begin());
  if (facts.size() == 1)
    cout << facts[0] << endl;
  else
    cout << 1 << endl;
}
