#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(NULL);
  cout.tie(NULL);
  setlocale(LC_ALL, "rus");
  ios_base::sync_with_stdio(false);
  long long n;
  cin >> n;
  vector<char> a(1000000 + 113, 0);
  for (long long i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      a[i] = 1;
      n /= i;
    }
  }
  long long x = 1;
  for (long long i = 1; i <= (int)1e6; i++)
    if (a[i]) x *= i;
  cout << x * n;
}
