#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
vector<pair<ll, int>> factorize(ll n) {
  vector<pair<ll, int>> div;
  ll d = n;
  for (ll i = 2; i * i <= n; i++) {
    pair<ll, int> p;
    if (d % i == 0) {
      p = make_pair(i, 0);
      while (d % i == 0) {
        d /= i;
        p.second++;
      }
      div.emplace_back(p);
    }
  }
  if (d != 1) div.emplace_back(d, 1);
  return div;
}
int main() {
  ll n;
  cin >> n;
  vector<pair<ll, int>> div = factorize(n);
  if (div.size() == 1) {
    cout << div[0].first << endl;
  } else {
    cout << 1 << endl;
  }
}
