#include <bits/stdc++.h>
using namespace std;
long long n, k = 2, nn, ans = 1;
int main() {
  cin >> n;
  while (k * k <= n) {
    if (n % k == 0) {
      long long p = 0;
      while (n % k == 0) {
        n /= k;
        p++;
      }
      if (p >= 1) ans *= k;
    }
    k++;
  }
  if (n > 1) ans *= n;
  cout << ans;
  return 0;
}
