#include <bits/stdc++.h>
using namespace std;
vector<long long> factors(long long n) {
  vector<long long> f;
  for (long long x = 2; x * x <= n; x++) {
    while (n % x == 0) {
      f.push_back(x);
      n /= x;
    }
  }
  if (n > 1) f.push_back(n);
  return f;
}
int main() {
  long long n;
  vector<long long> s;
  scanf("%lld", &n);
  if (n == 1) {
    printf("%d\n", 1);
    return 0;
  }
  s = factors(n);
  if (s[0] == s[s.size() - 1]) {
    printf("%lld\n", s[0]);
  } else {
    printf("%d\n", 1);
  }
  return 0;
}
