#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  long long n;
  cin >> n;
  long long res = 1;
  long long l = sqrt(n) + 1;
  vector<long long> p(l + 1, 1);
  p[0] = p[1] = 0;
  for (long long i = 2; i <= l; i++) {
    if (p[i] && i * i <= l) {
      for (long long j = i * i; j <= l; j += i) {
        p[j] = 0;
      }
    }
  }
  for (long long i = 2; i <= l; i++) {
    if (p[i] && n % i == 0) {
      long long d = n / i;
      if (d < i) continue;
      res *= i;
      while (n % i == 0) n /= i;
    }
  }
  res *= n;
  cout << res << endl;
  return 0;
}
