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