#include <bits/stdc++.h>
using namespace std;
const long long OO = 1e8;
const double EPS = (1e-7);
int dcmp(double x, double y) { return fabs(x - y) <= EPS ? 0 : x < y ? -1 : 1; }
const int N = 100;
int main() {
  ios::sync_with_stdio(false);
  long double n;
  cin >> n;
  vector<long long> v;
  long long s = sqrt(n);
  for (int i = (1); i < (int)(s + 1); ++i) {
    if ((long long)n % i == 0) {
      v.push_back(i);
      v.push_back(n / i);
    }
  }
  sort(v.begin(), v.end());
  long long ans = n;
  bool found;
  for (long long i = v.size() - 1; i >= 1; i--) {
    found = false;
    ans = v[i];
    for (int j = (1); j < (int)(i); ++j) {
      if (v[i] % (v[j] * v[j]) == 0) {
        found = true;
        break;
      }
    }
    if (!found) {
      break;
    }
  }
  cout << ans;
  return 0;
}
