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