#include <bits/stdc++.h>
using namespace std;
long long int maxN = 1e+5 + 8;
vector<long long int> sprime;
vector<char> prime(maxN, true);
void sieve(long long int n) {
  prime[0] = prime[1] = false;
  for (long long int i = 2; i <= n; ++i) {
    if (prime[i]) {
      sprime.push_back(i);
      for (long long int j = 2 * i; j <= n; j += i) prime[j] = false;
    }
  }
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int fastpowMOD(long long int a, long long int p, long long int MOD) {
  if (p == 0) return 1;
  long long int z = fastpowMOD(a, p / 2, MOD);
  z = (z * z) % MOD;
  if (p % 2) z = (z * a) % MOD;
  return z;
}
long long int fastpow(long long int a, long long int p) {
  if (p == 0) return 1;
  long long int z = fastpow(a, p / 2);
  z = (z * z);
  if (p % 2) z = (z * a);
  return z;
}
void print(vector<long long int> A) {
  int N = A.size();
  for (int i = 0; i < N - 1; i++) printf("%lld ", A[i]);
  printf("\n");
}
void solve() {
  long long int N;
  cin >> N;
  vector<long long int> A;
  A.push_back(N);
  for (long long int i = 2; i * i <= N; i++) {
    if (N % i == 0) {
      if (i * i == N)
        A.push_back(i);
      else {
        A.push_back(i);
        A.push_back(N / i);
      }
    }
  }
  long long int xx = A[0];
  for (int i = 1; i < (int)A.size(); i++) xx = gcd(xx, A[i]);
  printf("%lld\n", xx);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int T = 1, t;
  t = T;
  while (T--) {
    solve();
  }
}
