#include <bits/stdc++.h>
const int inf = (int)1e9;
const long long mod = 1e9 + 7;
const long long infll = (long long)1e18;
const long double eps = 1e-9;
using namespace std;
void solve() {
  long long n;
  cin >> n;
  set<long long> s;
  while (n > 1) {
    long long t = 0;
    for (long long i = 2; i * i <= n; i++) {
      if (n % i == 0) {
        t = i;
        break;
      }
    }
    if (t == 0) {
      s.insert(n);
      break;
    }
    s.insert(t);
    n /= t;
  }
  long long ans = 1;
  for (auto i = s.begin(); i != s.end(); i++) ans *= *i;
  cout << ans;
}
int main() {
  solve();
  return 0;
}
