#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i, p, res;
  cin >> n;
  res = n;
  for (i = 2; i * i <= n; ++i) {
    p = i * i;
    while (res % p == 0) {
      res /= i;
    }
  }
  cout << res << '\n';
  return 0;
}
