#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
bool b[maxn];
long long ans = 1, n;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0 && n > 1) {
      b[i] = true;
      ans *= i;
    }
    while (n % i == 0 && n > 1) n /= i;
  }
  if (n > 1) ans *= n;
  cout << ans << endl;
}
