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