#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000"]
#pragma GCC optimize("Ofast"]
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native"]
using namespace std;
signed main() {
  long long int n;
  cin >> n;
  vector<long long int> prime;
  long long int ans = 1;
  for (long long int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      ans *= i;
      while (n % i == 0) n /= i;
    }
  }
  ans *= n;
  cout << ans;
  return 0;
}
