#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-9;
const int inf = (1 << 30) - 1;
const long long inf64 = (1LL << 62) - 1;
const long double pi = acos(-1);
template <class T>
T sqr(T x) {
  return x * x;
}
template <class T>
T abs(T x) {
  return x < 0 ? -x : x;
}
int main() {
  ios_base::sync_with_stdio(0);
  long long n;
  cin >> n;
  long long min_p = -1;
  int num_p = 0;
  for (long long d = 2; d * d <= n; ++d) {
    if (n % d == 0) {
      ++num_p;
      if (min_p == -1) {
        min_p = d;
      }
      n /= d;
      while (n % d == 0) {
        n /= d;
      }
    }
  }
  if (n > 1) {
    ++num_p;
  }
  if (min_p == -1) {
    cout << n << "\n";
    return 0;
  }
  if (num_p == 1) {
    cout << min_p << "\n";
    return 0;
  }
  cout << 1 << "\n";
  return 0;
}
