#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, x = 0;
  cin >> n;
  x = n;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      x = gcd(i, x);
      x = gcd(n / i, x);
    }
  }
  cout << x;
}
