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