#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
bool compare(T x, U y) {
  return (abs(x - y) <= 1e-9);
}
const int MOD = 1e9 + 7;
const int N = 1e5 + 1;
vector<pair<int, int> > adj[N];
vector<int> is_res(N);
void solve() {
  long long n;
  cin >> n;
  if (n == 1)
    cout << 1;
  else {
    long long ans = 1;
    for (long long i = 2; i * i <= n; i++) {
      if (n % i == 0) {
        while (n % i == 0) n /= i;
        ans *= i;
      }
    }
    cout << ans * n;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  t = 1;
  while (t--) {
    solve();
    cout << "\n";
  }
}
