#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int t = 1;
set<ll> primeFactors(ll n) {
  set<ll> s;
  while (n % 2 == 0) {
    s.insert(2);
    n = n / 2;
  }
  for (ll i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      s.insert(i);
      n = n / i;
    }
  }
  if (n > 2) s.insert(n);
  return s;
}
void solve() {
  ll n;
  cin >> n;
  set<ll> s = primeFactors(n);
  ll ans = 1;
  for (ll i : s) {
    ans *= i;
  }
  cout << ans << "\n";
}
int main() {
  while (t--) {
    solve();
  }
  return 0;
}
