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