#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  long long i, j, ans = 0, tmp = 0, f = 0, a, p, num;
  vector<long long> factors;
  cin >> num;
  for (long long int i = 1; i <= sqrt(num); i++) {
    if (i * i == num) {
      factors.push_back(i);
      break;
    }
    if (num % i == 0) {
      factors.push_back(i);
      factors.push_back(num / i);
    }
  }
  sort(factors.begin(), factors.end());
  tmp = num;
  for (i = factors.size() - 1; i >= 0; i--) {
    f = 0;
    tmp = factors[i];
    for (j = 2; j * j <= tmp; j++) {
      if (tmp % (j * j) == 0) {
        f = 1;
        break;
      }
    }
    if (f != 1) {
      ans = tmp;
      break;
    }
    if (tmp == 1) ans = 1;
  }
  cout << ans;
  return 0;
}
