#include <bits/stdc++.h>
using namespace std;
long long cmmdc(long long a, long long b) {
  long long c;
  while (b) {
    c = a % b;
    a = b;
    b = c;
  }
  return a;
}
int main() {
  if (1) ios_base::sync_with_stdio(0), cin.tie(0);
  long long n;
  cin >> n;
  long long ans = n;
  for (long long i = 2; i * i <= n; ++i)
    if (n % i == 0) {
      ans = cmmdc(ans, i);
      ans = cmmdc(ans, n / i);
    }
  cout << ans;
  return 0;
}
