#include <bits/stdc++.h>
using namespace std;
long long res, n, divisor;
map<long long, long long> m;
int main() {
  cin >> n;
  long long tmp = n;
  divisor = 2;
  while (n > 1) {
    if (n % divisor == 0) {
      m[divisor]++;
      n /= divisor;
    } else
      divisor++;
    if (divisor * divisor > tmp) break;
  }
  m[n]++;
  res = 1;
  for (typeof((m).begin()) it = (m).begin(); it != (m).end(); it++)
    res *= (it->first);
  cout << res;
}
