#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  int a = 0;
  cin >> n;
  long long tp = n;
  for (long long i = 2; i <= sqrt(tp); i++)
    if (tp % i == 0) {
      while (tp % i == 0) tp /= i;
      a = i;
      break;
    }
  if (a == 0)
    cout << n;
  else if (tp != 1) {
    printf("1");
  } else
    printf("%d", a);
  return 0;
}
