#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  while (cin >> n) {
    vector<long long> dividers;
    dividers.push_back(n);
    for (long long i = 2; i * i <= n; i++) {
      if (n % i == 0) {
        dividers.push_back(i);
        if (i * i != n) dividers.push_back(n / i);
        if (i * i == n) dividers.erase(dividers.begin());
      }
    }
    if (dividers.size() == 1) {
      cout << dividers[dividers.size() - 1] << endl;
    } else {
      sort(dividers.begin(), dividers.end());
      for (int i = 0; i < dividers.size(); i++) {
        for (int j = i + 1; j < dividers.size(); j++) {
          if (dividers[j] % (dividers[i] * dividers[i]) == 0) {
            dividers.erase(dividers.begin() + j);
            j = i;
          }
        }
      }
      cout << dividers[dividers.size() - 1] << endl;
    }
  }
  return 0;
}
