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