#include <bits/stdc++.h>
using namespace std;
const long long int inf = 1000000000;
const long long int MOD = 1000000007;
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  register long long int i, j, k, x, y, m, n, t, q, temp, sum = 0, count = 0,
                                                          f = 1, ans = 1;
  cin >> n;
  k = sqrt(n);
  vector<long long int> v, c;
  unordered_map<long long int, long long int> check;
  for (i = 1; i <= k; i++) {
    check[i * i] = 1;
  }
  for (i = 1; i <= k; i++) {
    if (n % i == 0) {
      if (n / i == i)
        v.push_back(i);
      else {
        v.push_back(i);
        c.push_back(n / i);
      }
    }
  }
  if (!c.empty()) {
    for (i = c.size() - 1; i >= 0; i--) {
      v.push_back(c[i]);
    }
  }
  for (i = 0; i < v.size(); i++) {
    x = v[i];
    y = sqrt(x);
    f = 0;
    for (j = 1; j <= i; j++) {
      if (check[v[j]] == 1 && x % v[j] == 0) {
        f = 1;
      }
    }
    if (!f) {
      ans = x;
    }
  }
  cout << ans;
}
