#include <bits/stdc++.h>
using namespace std;
long long a[100010];
int main() {
  long long n;
  cin >> n;
  long long tmp = n;
  for (int i = 2; (long long)i * i <= tmp; i++) {
    if (tmp % i == 0) {
      a[++a[0]] = i;
      while (tmp % i == 0) {
        tmp /= i;
      }
    }
  }
  if (tmp != 1) {
    a[++a[0]] = tmp;
  }
  if (a[0] == 1) {
    cout << a[1] << endl;
  } else {
    puts("1");
  }
  return 0;
}
