#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("avx2")
using namespace std;
template <class T>
ostream& operator<<(ostream& out, vector<T> V) {
  for (auto& i : V) out << i << " ";
  return flush(out);
}
vector<int_fast64_t> denominators;
void find_denominators(int_fast64_t n) {
  for (int_fast64_t i = 2, lim = floor(sqrt(n)) + 1; i < lim; i++) {
    if (n % i == 0) {
      denominators.push_back(i);
      if (n / i != i) denominators.push_back(n / i);
    }
  }
  sort((denominators).begin(), (denominators).end());
}
int_fast64_t solve() {
  vector<int_fast64_t> parsed;
  for (int_fast32_t i = 0; i < (int)((denominators).size()); i++) {
    if (!denominators[i]) continue;
    parsed.push_back(denominators[i]);
    for (int_fast32_t j = i + 1; j < (int)((denominators).size()); j++) {
      if (denominators[j] % denominators[i] == 0) denominators[j] = 0;
    }
  }
  return (int)((parsed).size());
}
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(false);
  int_fast64_t N;
  cin >> N;
  find_denominators(N);
  int_fast64_t res = solve();
  if (denominators.empty()) {
    cout << N << endl;
  } else
    cout << (res != 1 ? 1 : denominators[0]) << endl;
}
