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