#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return a ? gcd(b % a, a) : b; }
signed main() {
  long long n;
  cin >> n;
  vector<long long> arr;
  for (long long x = 2; x * x <= n; x++) {
    if (n % x == 0) {
      arr.push_back(x);
      if (x * x != n) arr.push_back(n / x);
    }
  }
  arr.push_back(n);
  long long ans = 0;
  for (long long i = 0; i < arr.size(); i++) ans = gcd(ans, arr[i]);
  cout << ans << endl;
}
