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