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