#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int N = 1000000;
long long n;
long long a[N + 10];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  long long ans = 1;
  long long x = n;
  for (int i = 2; i <= 1e6; i++) {
    if (x == 0 || i > n) break;
    while (x != 0 && x % i == 0) a[i]++, x /= i;
  }
  if (x != 0) ans = x;
  for (int i = 1; i <= 1e6; i++) {
    if (a[i] != 0) ans *= i;
  }
  cout << (ans == 1 ? n : ans);
  return 0;
}
