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