#include <bits/stdc++.h>
using namespace std;
inline bool inrange(int i, int j, int n, int m) {
  return (i >= 0 && j >= 0 && i < n && j < m);
}
long long gcd(long long a, long long b) {
  return (!(a % b)) ? b : gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
struct point {
  double x, y;
  point() {}
  point(double a, double b) { x = a, y = b; }
  static bool online(point a, point b, point c) {
    double m1 = (a.y - b.y) / (a.x - b.x);
    double m2 = (a.y - c.y) / (a.x - c.x);
    return m1 == m2;
  }
  static long double dist(point a, point b) {
    return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
  }
};
long long my_power(long long x, long long y) {
  if (y == 0) return 1;
  if (y == 1) return x;
  long long tmp = my_power(x, y / 2);
  if ((!((y)&1))) return (tmp * tmp) % 1000000007;
  return ((tmp * tmp) % 1000000007 * x) % 1000000007;
}
struct fraction {
  int x, y;
  fraction() {}
  fraction(int a, int b) { x = a, y = b; }
};
struct triangle {
  point a, b, c;
  long double L1, L2, L3;
  triangle() {}
  triangle(point x, point y, point z) {
    a = x, b = y, c = z, L1 = point::dist(a, b), L2 = point::dist(b, c),
    L3 = point::dist(c, a);
  }
  triangle(long double x, long double y, long double z) {
    L1 = x, L2 = y, L3 = z;
  }
  static long double area(long double LL1, long double LL2, long double LL3) {
    vector<long double> tmp(3);
    tmp[0] = LL1, tmp[1] = LL2, tmp[2] = LL3;
    sort(tmp.begin(), tmp.end());
    long double x = tmp[2], y = tmp[1], z = tmp[0];
    return sqrt((x) * (x) * (z) * (z) -
                ((((x) * (x) + (z) * (z) - (z) * (z)) / 2) *
                 (((x) * (x) + (z) * (z) - (z) * (z)) / 2))) /
           2;
  }
  static long double height(long double LL1, long double LL2, long double LL3,
                            long double base) {
    return 2 * (triangle::area(LL1, LL2, LL3)) / base;
  }
};
bool isprime(long long x) {
  if (x == 1) return 0;
  for (int i = 2, a = sqrt(x); i <= a; i++)
    if (!(x % i)) {
      return 0;
    }
  return 1;
}
long long largfact(long long x) {
  if (isprime(x)) return x;
  for (int i = sqrt(x); i >= 2; i--)
    if (!(x % i) && isprime(i)) return i;
  return 1;
}
bool palindrome(long long x) {
  long long y = 0, tmp = x;
  while (tmp) y = y * 10 + tmp % 10, tmp /= 10;
  return (x == y);
}
long long reverse_num(long long x) {
  long long y = 0;
  while (x) y = y * 10 + x % 10, x /= 10;
  return y;
}
long long sum_a_to_b(long long a, long long b) {}
long long sum_of_the_squares(long long n) {
  return (n * (n + 1) * (2 * n + 1)) / 6;
}
long long Interior_Angle_polygon(long long n) { return (n - 2) * 180 / n; }
void Pythagorean_Triples() {}
inline bool sol(double p, double q, double r, double s, double t, double u,
                double x) {
  long double res = p * powl(2.718281828, -x) + q * sin(x) + r * cos(x) +
                    s * tan(x) + t * (x) * (x) + u;
  return (res <= 1e-9);
}
inline long long pow(int x, int y) {
  if (y == 0) return 1;
  if (y % 2 == 0) {
    long long temp = pow(x, y / 2);
    return (temp * temp);
  }
  return x * pow(x, y - 1);
}
int findTrailingZeros(int n) {
  int res = 0;
  for (int i = 5; n / i >= 1; i *= 5) res += n / i;
  return res;
}
inline long long bigmod(long long a, long long p, long long m) {
  if (p == 0) return 1;
  if (p % 2) {
    return ((a % m) * (bigmod(a, p - 1, m))) % m;
  } else {
    long long c = bigmod(a, p / 2, m);
    return ((c % m) * (c % m)) % m;
  }
}
inline long long modInverseEuler(long long a, long long m) {
  return bigmod(a, m - 2, m);
}
inline pair<long long, pair<long long, long long> > extendedEuclid(
    long long a, long long b) {
  if (a == 0) return make_pair(b, make_pair(0, 1));
  pair<long long, pair<long long, long long> > p;
  p = extendedEuclid(b % a, a);
  return make_pair(
      p.first,
      make_pair(p.second.second - p.second.first * (b / a), p.second.first));
}
inline long long modInverse(long long a, long long m) {
  return (extendedEuclid(a, m).second.first + m) % m;
}
inline long long sum_1_to_n(long long n) { return n * (n + 1) / 2; }
int num_ones(int n) {
  int re = 0;
  for (int i = 0; i < (int)(32); i++) {
    if (n >> i & 1) re++;
  }
  return re;
}
bool cmp(pair<int, int> a, pair<int, int> b) { return (a.second < b.second); }
vector<vector<int> > graph;
vector<int> BFS(int s, vector<vector<int> >& adjList) {
  vector<int> len(adjList.size(), 1e8);
  queue<pair<int, int> > q;
  q.push(make_pair(s, 0)), len[s] = 0;
  int cur, dep;
  while (!q.empty()) {
    pair<int, int> p = q.front();
    q.pop();
    cur = p.first, dep = p.second;
    for (int i = 0; i < adjList[cur].size(); i++)
      if (len[adjList[cur][i]] == 1e8)
        q.push(make_pair(adjList[cur][i], dep + 1)),
            len[adjList[cur][i]] = dep + 1;
  }
  return len;
}
int a[1000];
vector<long long> fact;
void do_it(long long n) {
  for (int i = 2, a = sqrt(n); n > 1; i++) {
    bool ok = 0;
    while (n % i == 0 && n) {
      ok = 1, n /= i;
    }
    if (ok) {
      fact.push_back(i);
      if (isprime(n)) {
        fact.push_back(n);
        break;
      }
    }
    if (i == a && fact.empty()) {
      fact.push_back(n);
      break;
    }
  }
  return;
}
int main() {
  long long n;
  cin >> n;
  do_it(n);
  long long res = 1;
  for (int i = 0; i < (int)(fact.size()); i++) {
    res *= fact[i];
  }
  cout << res;
  return 0;
}
