#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000 * 1000 + 17;
long long n, ans = 1;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  for (long long i = 2; i * i <= n; i++) {
    long long cnt = 0;
    while (n % i == 0) n /= i, cnt++;
    for (int j = 0; j < min(cnt, 1LL); j++) ans *= i;
  }
  ans *= n;
  cout << ans << endl;
  return 0;
}
