#include <bits/stdc++.h>
using namespace std;
inline long long int read() {
  char c = getchar();
  long long int num, sign = 1;
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') sign = -1;
  for (num = 0; c >= '0' && c <= '9';) {
    c -= '0';
    num = num * 10 + c;
    c = getchar();
  }
  return num * sign;
}
inline long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n = read();
  long long int ans = 1;
  long long int x = n;
  for (int i = 2; i <= sqrt(n); i++) {
    if (x % i == 0) {
      ans *= (long long int)i;
      while (x % i == 0) x /= i;
    }
  }
  if (x > 1) ans *= x;
  cout << ans << endl;
  return 0;
}
