#include <bits/stdc++.h>
using namespace std;
long long n;
long long sol = -1;
vector<long long> vek;
bool cmp(long long a, long long b) { return a > b; }
int main() {
  scanf("%I64d", &n);
  for (long long i = 1; i * i <= n; i++) {
    if (n % i) continue;
    vek.push_back(i);
    vek.push_back(n / i);
  }
  sort(vek.begin(), vek.end(), cmp);
  for (int i = 0; i < (int)vek.size(); i++) {
    bool bul = true;
    for (long long j = 2; j * j <= vek[i]; j++) {
      if (vek[i] % (j * j) == 0) {
        bul = false;
        break;
      }
    }
    if (bul) {
      printf("%I64d\n", vek[i]);
      return 0;
    }
  }
  return 0;
}
