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