#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  for (long long int xoxo = 2; xoxo <= sqrt(n); xoxo++) {
    while (n % (xoxo * xoxo) == 0) n = n / xoxo;
  }
  cout << n;
}
