#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int INF = 2e9;
const long long INFLL = 1e18;
const int MAX_N = 1;
long long N;
long long g = 0;
long long gcd(long long x, long long y) { return (x == 0) ? y : gcd(y % x, x); }
int main() {
  scanf("%lld", &N);
  for (long long i = 2; i * i <= N; i++) {
    bool tf = true;
    if (N % i == 0) {
      g = gcd(g, i);
      g = gcd(g, (N / i));
    }
  }
  if (g == 0) {
    printf("%lld", N);
    return 0;
  } else {
    printf("%lld", g);
    return 0;
  }
  return 0;
}
