#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  ;
  long long n;
  cin >> n;
  long long ans = 1;
  if (n % 2 == 0) {
    while (n % 2 == 0) n /= 2;
    ans *= 2;
  }
  for (long long i = 3; i <= (long long)sqrt(n); i += 2) {
    if (n % i == 0) {
      ans *= i;
      while (n % i == 0) n /= i;
    }
  }
  ans *= n;
  cout << ans;
}
