#include <bits/stdc++.h>
using namespace std;
int init() {
  ios_base::sync_with_stdio(0);
  return 0;
}
int initializer = init();
bool will_it_be_AC() { return true; }
bool prime(long long n) {
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
vector<long long> divs(long long n) {
  vector<long long> v;
  long long i = 2;
  while (i * i <= n)
    if (n % i == 0) {
      n /= i;
      v.push_back(i);
    } else
      i++;
  v.push_back(n);
  return v;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long extgcd(long long a, long long b, long long &x, long long &y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  long long x1, y1, d = extgcd(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return d;
}
template <typename T>
void ivector(vector<T> &v, int size) {
  for (int i = 0; i < size; i++) cin >> v[i];
}
template <typename T>
void ovector(vector<T> v, int size, string separator) {
  if (size != 0) cout << v[0];
  for (int i = 1; i < size; i++) cout << separator << v[i];
}
int getint() {
  int r;
  cin >> r;
  return r;
}
template <typename T>
class fenwick {
 private:
  vector<T> t;
  int n;

 public:
  fenwick(int nn) { init(nn); }
  void init(int nn) {
    n = nn;
    t.assign(n, 0);
  }
  T sum(int r) {
    T result = 0;
    for (; r >= 0; r = (r & (r + 1)) - 1) result += t[r];
    return result;
  }
  void inc(int i, T delta) {
    for (; i < n; i = (i | (i + 1))) t[i] += delta;
  }
  T sum(int l, int r) { return sum(r) - sum(l - 1); }
  T get(int i) { return sum(i, i); }
  void put(int i, T v) { inc(i, v - sum(i, i)); }
  int size() { return n; }
};
int main() {
  long long n;
  cin >> n;
  vector<long long> q;
  q = divs(n);
  sort(q.begin(), q.end());
  long long ans = q[0];
  for (int i = 1; i < q.size(); i++)
    if (q[i] != q[i - 1]) ans *= q[i];
  cout << ans;
  return 0;
}
