#include <bits/stdc++.h>
using namespace std;
const int maxN = 1e5;
const int INF = 1e9;
const int eps = 1e-9;
const int inf = -INF;
const int base = 1000 * 1000 * 1000;
const int mod = 1e9 + 7;
typedef long long mass[maxN + 1];
long long readInt() {
  bool minus = false;
  long long result = 0;
  char ch;
  ch = getchar();
  while (true) {
    if (ch == '-') break;
    if (ch >= '0' && ch <= '9') break;
    ch = getchar();
  }
  if (ch == '-')
    minus = true;
  else
    result = ch - '0';
  while (true) {
    ch = getchar();
    if (ch < '0' || ch > '9') break;
    result = result * 10 + (ch - '0');
  }
  if (minus)
    return -result;
  else
    return result;
}
struct pt {
  int x, y, id;
};
bool comp(pt a, pt b) { return a.x < b.x || (a.x == b.x && a.y < b.y); }
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long binary_power(long long a, long long n) {
  long long res = 1;
  while (n > 0) {
    if (n % 2 == 0) {
      a *= a;
      n >>= 1;
    } else {
      res *= a;
      n--;
    }
  }
  return res;
}
int bitCount(long long n) { return __builtin_popcount(n); }
int LowerBound(int L, int R, int x, long long w[]) {
  while (R - L > 1) {
    int mid = (L + R) >> 1;
    if (w[mid] >= x)
      R = mid;
    else
      L = mid;
  }
  if (w[R] == x) return R;
  return -1;
}
int UpperBound(int L, int R, int x, long long w[]) {
  while (R - L > 1) {
    int mid = (L + R) >> 1;
    if (w[mid] <= x)
      L = mid;
    else
      R = mid;
  }
  if (w[L] == x) return L;
  return -1;
}
double dis(double x1, double y1, double x2, double y2);
double triangle_area(int x1, int y1, int x2, int y2, int x3, int y3);
int triangle_area_2(int x1, int y1, int x2, int y2, int x3, int y3);
int main() {
  long long n = readInt();
  set<long long> st;
  map<long long, long long> mp;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      while (n % i == 0) {
        n /= i;
        mp[i]++;
      }
    }
  }
  if (n > 1) {
    mp[n]++;
  }
  long long ans = 1;
  for (map<long long, long long>::iterator it = mp.begin(); it != mp.end();
       it++) {
    ans *= (*it).first;
  }
  cout << ans;
  return 0;
}
double dis(double x1, double y1, double x2, double y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
int triangle_area_2(int x1, int y1, int x2, int y2, int x3, int y3) {
  return (x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1);
}
double triangle_area(int x1, int y1, int x2, int y2, int x3, int y3) {
  return abs(triangle_area_2(x1, y1, x2, y2, x3, y3)) / 2.0;
}
