#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 1, 0, -1, -1, 1, 1, -1};
int dy[] = {1, 0, -1, 0, -1, -1, 1, 1};
int kx[] = {-2, -2, -1, 1, 2, 2, 1, -1};
int ky[] = {-1, 1, 2, 2, 1, -1, -2, -2};
inline long long gcd(long long a, long long b) {
  a = fabs(a);
  b = fabs(b);
  while (b) {
    a = a % b;
    swap(a, b);
  }
  return a;
}
inline long long bigmod(long long a, long long p, long long m) {
  long long res = 1 % m, x = a % m;
  while (p) {
    if (p & 1) res = (res * x) % m;
    x = (x * x) % m;
    p >>= 1;
  }
  return res;
}
struct DATA {};
vector<long long> v;
bool check(long long n) {
  long long x;
  for (int i = (int)(2); i <= (int)(sqrt(n)); i++) {
    if (n % i == 0) {
      x = sqrt(i);
      if (x * x == i) return true;
      if (n / i != i) {
        x = sqrt(n / i);
        if (x * x == n / i) return true;
      }
    }
  }
  x = sqrt(n);
  if (x * x == n) return true;
  return false;
}
int main() {
  long long n;
  scanf("%lld", &n);
  if (n == 1) {
    cout << 1 << endl;
    return 0;
  }
  for (int i = (int)(2); i <= (int)(sqrt(n)); i++) {
    if (n % i == 0) {
      v.push_back(i);
      if (n / i != i) {
        v.push_back(n / i);
      }
    }
  }
  v.push_back(n);
  sort(v.rbegin(), v.rend());
  for (int i = (int)(0); i <= (int)(v.size() - 1); i++) {
    if (!check(v[i])) {
      cout << v[i] << endl;
      return 0;
    }
  }
  return 0;
}
