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