#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
const int MXN = 1e6 + 7;
long long n, ans = 1, m;
string s;
int main() {
  cin >> n;
  m = n;
  for (long long i = 2; i * i <= m; i++)
    if (m % i == 0) {
      ans *= i;
      while (m % i == 0) {
        m /= i;
      }
    }
  if (m > 1) {
    ans *= m;
  }
  cout << ans;
  return 0;
}
