#include <bits/stdc++.h>
using namespace std;
long long fpow(long long a, int b, int mod) {
  long long res = 1;
  for (; b > 0; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res % mod;
}
const int mod = 1e9 + 7;
const int N = 1e4 + 100;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  long long n;
  cin >> n;
  long long ans = 0;
  long long x = sqrt(n);
  for (long long i = 2; i <= x; i++) {
    if (n % i == 0) {
      ans = gcd(ans, i);
      ans = gcd(ans, n / i);
    }
  }
  if (ans != 0)
    cout << ans << endl;
  else
    cout << n << endl;
  return 0;
}
