#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<long long> v;
  for (auto i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i == i) {
        v.push_back(i);
      } else {
        v.push_back(i);
        v.push_back(n / i);
      }
    }
  }
  sort(v.begin(), v.end());
  long long l = 1;
  long long r = v.size() - 1;
  while (l < r) {
    if (v[r] % (v[l] * v[l]) == 0) {
      l = 1;
      r--;
    } else {
      l++;
    }
  }
  cout << v[r] << endl;
}
