#include <bits/stdc++.h>
const long long N = 1e6 + 10, MOD = 998244353;
using namespace std;
long long n, t, m, ans = 0;
vector<long long> divisors;
void getDivisors(long long n) {
  for (long long i = 1; i * i <= n; ++i) {
    if (n % i == 0) {
      divisors.push_back(i);
      if (i * i != n) divisors.push_back(n / i);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  getDivisors(n);
  sort(divisors.begin(), divisors.end());
  for (int i = 0; i < divisors.size() && !ans; i++) {
    for (int j = 0; j < divisors.size() && !ans; j++) {
      if (divisors[j] < divisors[i] && divisors[i] % divisors[j] ||
          divisors[j] > divisors[i] && divisors[j] % divisors[i])
        ans++;
    }
  }
  if (divisors.size() > 2)
    cout << (ans ? 1 : divisors[1]);
  else
    cout << (ans ? 1 : n);
  return 0;
}
