#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  long long x = 1;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      if (x == 1) {
        x = i;
      } else {
        cout << "1";
        return 0;
      }
      while (n % i == 0) n /= i;
    }
  }
  if (n > 1) {
    if (x == 1)
      cout << n;
    else
      cout << 1;
  } else
    cout << x;
  return 0;
}
