#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long t = n;
  vector<long long> divisors;
  vector<bool> primes(sqrt(t) + 2, true);
  primes[0] = false;
  primes[1] = false;
  for (long long i = 2; i < primes.size(); i++) {
    if (primes[i]) {
      for (long long j = i * 2; j < primes.size(); j += i) {
        primes[j] = false;
      }
    }
  }
  map<long long, long long> cnt;
  for (long long i = 2; i < sqrt(t) + 1; i++) {
    while (primes[i] && n % i == 0) {
      n /= i;
      cnt[i]++;
    }
  }
  if (n > 1) {
    cnt[n]++;
  }
  if (t == 1)
    cout << 1 << endl;
  else if (t == 2)
    cout << 2 << endl;
  else if (cnt.size() == 1 && (*cnt.begin()).first != n) {
    cout << (*cnt.begin()).first << endl;
  } else if (cnt.size() == 1 && (*cnt.begin()).first == n) {
    cout << t << endl;
  } else {
    cout << 1 << endl;
  }
}
