#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using namespace std::chrono;
ll pow(ll a, ll p, ll m = 1000000007) {
  ll res = 1;
  while (p > 0) {
    if (p & 1) res = (res * a) % m;
    a = (a * a) % m;
    p >>= 1;
  }
  return res;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  long long n;
  cin >> n;
  set<long long> s;
  while (n % 2 == 0) {
    s.insert(2);
    n = n / 2;
  }
  for (long long i = 3; i <= sqrt(n); i += 2) {
    while (n % i == 0) {
      s.insert(i);
      n = n / i;
    }
  }
  if (n > 2) s.insert(n);
  if (s.size() == 1)
    cout << *s.begin() << '\n';
  else
    cout << 1 << '\n';
  return 0;
}
