#include <bits/stdc++.h>
using namespace std;
ofstream fo("test.out");
ifstream fi("test.inp");
int n, m, k, dem;
int x[200005], y[200005];
int main() {
  long long a;
  cin >> a;
  for (long long i = 2; i * i <= a; i++) {
    while (a % (i * i) == 0) a /= i;
  }
  cout << a;
}
