#include <bits/stdc++.h>
using namespace std;
const int INF = (1 << 30);
const long long INFLL = (1ll << 60);
const long long MOD = (long long)(1e9 + 7);
void mul_mod(long long& a, long long b) {
  a *= b;
  a %= MOD;
}
void add_mod(long long& a, long long b) {
  a = (a < MOD) ? a : (a - MOD);
  b = (b < MOD) ? b : (b - MOD);
  a += b;
  a = (a < MOD) ? a : (a - MOD);
}
long long gcd(long long a, long long b) { return ((b) ? gcd(b, a % b) : a); }
int main(void) {
  long long i, n, g;
  cin >> n;
  g = n;
  for (i = 2ll; i * i <= n; ++i) {
    if (n % i) {
      continue;
    }
    g = gcd(g, i);
    g = gcd(g, n / i);
  }
  cout << g << endl;
  return 0;
}
