#include <bits/stdc++.h>
using namespace std;
bool go(unsigned long long int n) {
  for (unsigned long long int i = 2; i <= sqrt(n); i++) {
    if (n % (i * i) == 0) {
      return false;
    }
  }
  return true;
}
int main() {
  int cnt = 0;
  unsigned long long int n;
  cin >> n;
  vector<unsigned long long int> v;
  unordered_map<unsigned long long int, unsigned long long int> mp;
  for (unsigned long long int i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i != i) {
        if (mp.find(i) == mp.end()) {
          v.push_back(i);
        }
        if (mp.find(n / i) == mp.end()) {
          v.push_back(n / i);
        }
      } else {
        if (mp.find(i) == mp.end()) v.push_back(i);
      }
      mp[i] = 1;
      mp[n / i] = 1;
    }
  }
  sort(v.begin(), v.end(), greater<unsigned long long int>());
  unsigned long long int ans;
  for (int i = 0; i < v.size(); i++) {
    if (go(v[i])) {
      ans = v[i];
      break;
    }
  }
  cout << ans << endl;
}
