#include <bits/stdc++.h>
using namespace std;
const int OO = int(1e6);
bool dcmp(double a, double b) { return fabs(a - b) < 1e-8; }
int Dcmp(long double a, long double b) {
  return fabs(a - b) <= 1e-8 ? 0 : a < b ? -1 : 1;
}
double long dist(double long x1, double long y1, double long x2,
                 double long y2) {
  return (sqrt((y1 - y2) * (y1 - y2) + (x1 - x2) * (x1 - x2)));
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
bool isPrime(long long n) {
  if (n == 2) return true;
  if (n < 2 || n % 2 == 0) return false;
  for (long long i = 3; i * i <= n; i += 2)
    if (n % i == 0) return false;
  return true;
}
bool SieveCheck[int(1e6)];
void SievePrime(long long n) {
  memset(SieveCheck, true, sizeof(SieveCheck));
  SieveCheck[0] = SieveCheck[1] = false;
  for (long long i = 2; i <= n; i++) {
    if (SieveCheck[i]) {
      for (int j = i + i; j <= n; j += i) {
        SieveCheck[j] = false;
      }
    }
  }
}
void INPUT() {
  cout << fixed << setprecision(20);
  ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
}
int main() {
  INPUT();
  long long n;
  long long ans = 1;
  cin >> n;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      long long a = i, b = n / i;
      if (isPrime(a)) ans *= a;
      if (a != b && isPrime(b)) ans *= b;
    }
  }
  cout << ans;
  return 0;
}
