#include <bits/stdc++.h>
using namespace std;
vector<long long> v;
void factorise(long long n) {
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      v.push_back(i);
      while (n % i == 0) n = n / i;
    }
  }
  if (n > 1) v.push_back(n);
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  if (n == 1) {
    cout << 1 << "\n";
    return 0;
  }
  factorise(n);
  if (v.size() == 1) {
    cout << v[0] << "\n";
  } else {
    cout << 1 << "\n";
  }
}
