#include <bits/stdc++.h>
using namespace std;
long long n, m, R, a, b, F, x, z;
int main() {
  cin >> n;
  R = 1;
  a = 2;
  m = n;
  while (a * a <= n) {
    if (n % a == 0) {
      R *= a;
      while (n % a == 0) n = n / a;
    }
    a++;
  }
  if (R != 1)
    cout << R * n << endl;
  else
    cout << m << endl;
}
