#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  for (; b; a %= b, swap(a, b))
    ;
  return a;
}
int main() {
  long long n;
  cin >> n;
  long long ans = n;
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) {
      ans = gcd(ans, i);
      ans = gcd(ans, n / i);
    }
  cout << ans;
}
