#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  while (cin >> n) {
    long long fi = 1;
    for (long long i = 2; i * i <= n; i++) {
      bool eval = 0;
      while (n % i == 0) {
        eval = 1;
        n /= i;
      }
      fi *= (eval ? i : 1);
    }
    fi *= n;
    cout << fi << endl;
  }
  return 0;
}
