#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long x = sqrt(n);
  long count = 0, div;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      long long d = n / i;
      if (count == 0) {
        div = i;
        count++;
      }
      if (count > 0 && i % div > 0) {
        count++;
        break;
      }
      if (count > 0 && d % div > 0) {
        count++;
        break;
      }
    }
  }
  if (count == 0)
    cout << n << endl;
  else if (count == 1)
    cout << div << endl;
  else
    cout << 1 << endl;
  return 0;
}
