#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int tc, n, i, x, ans;
  cin >> n;
  long long int minm = -1;
  for (i = 2; i * i <= n; i++) {
    if ((n % i) == 0) {
      minm = i;
      break;
    }
  }
  if (minm == -1) {
    cout << n << endl;
  } else {
    while (n % minm == 0) {
      n = n / minm;
    }
    if (n == 1) {
      cout << minm << endl;
    } else {
      cout << 1 << endl;
    }
  }
}
