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