#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, temp, i;
  cin >> n;
  for (i = 1000000; i > 1; i--) {
    while (n % (i * i) == 0) {
      n = n / i;
    }
  }
  cout << n;
  return 0;
}
