#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  while (b > 0) {
    long long tmp = a;
    a = b;
    b = tmp % b;
  }
  return a;
}
const int M = 1e9 + 7;
long long powmod(long long a, long long b, long long mod) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res % mod;
}
const int N = 1e5 + 1;
const long long inf = 1e18 + 10;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long ans = n;
  vector<long long> div;
  for (long long i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      div.push_back(i);
      if (i != n / i) div.push_back(n / i);
    }
  }
  long long g = 0;
  for (int i = 0; i < div.size(); ++i) {
    g = gcd(div[i], g);
  }
  if (g != 0) ans = g;
  cout << ans << endl;
  return 0;
}
