#include <bits/stdc++.h>
using namespace std;
const double pi = 2 * acos(0.0);
const int mod = 1e9 + 7;
class Solver {
  long long n;

 public:
  void solve() {
    cin >> n;
    vector<long long> factors;
    for (long long i = 2; i * i <= n; i++) {
      if (n % i == 0) {
        factors.push_back(i);
        while (n % i == 0) {
          n /= i;
        }
      }
    }
    if (n > 1) factors.push_back(n);
    long long ans = 1;
    if (factors.size() == 1) {
      ans = factors[0];
    }
    cout << ans;
  }
};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  Solver s;
  s.solve();
}
