#include <bits/stdc++.h>
using namespace std;
void prime(long long int n, set<long long int> &s) {
  if (n % 2 == 0) {
    s.insert(2);
    n /= 2;
  }
  while (n % 2 == 0) {
    n /= 2;
  }
  for (int i = 3; i <= sqrt(n); i += 2) {
    if (n % i == 0) {
      s.insert(i);
      n /= i;
    }
    while (n % i == 0) {
      n /= i;
    }
  }
  if (n > 2) s.insert(n);
}
int main() {
  long long int n;
  cin >> n;
  set<long long int> s;
  prime(n, s);
  if (s.size() == 1)
    cout << *(s.begin()) << endl;
  else
    cout << 1 << endl;
  return (0);
}
