#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  vector<long long> v;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      v.push_back(i);
      v.push_back(n / i);
    }
  }
  sort(v.begin(), v.end());
  long long ans = 1;
  for (long long x : v) {
    bool ok = true;
    for (long long j = 2; j * j <= x; j++) {
      if (x % (j * j) == 0) {
        ok = false;
        break;
      }
    }
    if (ok) ans = x;
  }
  cout << ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
