#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
void solve() {
  long long n;
  scanf("%I64d", &n);
  long long sqt = sqrt(n);
  long long g = n;
  for (int i = 2; i <= sqt; ++i) {
    if (n % i == 0) {
      g = gcd(g, i);
      g = gcd(g, n / i);
    }
  }
  printf("%I64d\n", g);
}
int main() {
  solve();
  return 0;
}
