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