#include <bits/stdc++.h>
using namespace std;
vector<long long> S;
int main() {
  long long n;
  cin >> n;
  if (n == 1) {
    cout << 1 << endl;
    return 0;
  }
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) S.push_back(i);
    while (n % i == 0) n /= i;
  }
  if (n > 1) S.push_back(n);
  if (S.size() > 1)
    cout << 1 << endl;
  else {
    cout << S[0] << endl;
  }
  return 0;
}
