#include <bits/stdc++.h>
using namespace std;
const int MAXM = 1000;
long long n, ans = 1;
int m;
int main(void) {
  cin >> n;
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) {
      ans *= i;
      while (n % i == 0) n /= i;
    }
  if (n != 1) ans *= n;
  cout << ans << endl;
  return 0;
}
