#include <bits/stdc++.h>
using namespace std;
long long mod = (long long)1e9 + 7;
const long long INF = (long long)1e18;
long long power(long long a, long long b) {
  long long ret = 1;
  while (b) {
    if (b & 1) ret *= a;
    a *= a;
    if (ret >= mod) ret %= mod;
    if (a >= mod) a %= mod;
    b >>= 1;
  }
  return ret;
}
long long inv(long long x) { return power(x, mod - 2); }
int main() {
  long long n;
  cin >> n;
  vector<long long> v;
  for (long long i = 1; i <= sqrtl(n); i++) {
    if (n % i == 0) {
      v.push_back(i);
      if ((n / i) != i) v.push_back(n / i);
    }
  }
  sort(v.begin(), v.end(), greater<long long>());
  for (long long i = 0; i < ((long long)v.size()); i++) {
    long long a = 2, f = 0;
    while (a * a <= v[i]) {
      if (v[i] % (a * a) == 0) {
        f++;
        break;
      }
      a++;
    }
    if (f == 0) {
      cout << v[i] << "\n";
      break;
    }
  }
}
