#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  if (n == 1) {
    cout << 1;
    return 0;
  }
  map<long long, long long> mp;
  for (long long i = 2; i * i <= n; i++) {
    long long c = 0;
    while (n % i == 0) {
      n /= i;
      c++;
    }
    if (c > 0) mp[i] = c;
  }
  if (n > 1) mp[n]++;
  if (mp.size() > 1)
    cout << 1;
  else
    cout << mp.begin()->first;
}
