#include <bits/stdc++.h>
using namespace std;
long long int getprime(long long int n) {
  long long int temp = n;
  set<long long int> s;
  while (temp % 2 == 0) {
    temp = temp / 2;
    s.insert(2);
  }
  for (long long int i = 3; i <= sqrt(temp); i += 2) {
    while (temp % i == 0) {
      s.insert(i);
      temp = temp / i;
    }
  }
  if (temp > 2) s.insert(temp);
  long long int ans = 1;
  for (auto uj : s) {
    ans = ans * uj;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n;
  cin >> n;
  long long int ans = getprime(n);
  cout << ans << endl;
}
