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