#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
long long n;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  vector<long long> V;
  for (long long i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      V.push_back(i);
      V.push_back(n / i);
    }
  }
  V.push_back(n);
  long long ans = n;
  for (auto v : V) {
    ans = gcd(ans, v);
  }
  cout << ans << endl;
  return 0;
}
