#include <bits/stdc++.h>
using namespace std;
bool mycomp(pair<int, int> tt, pair<int, int> yy) {
  return tt.first - tt.second > yy.first - yy.second;
}
bool ispalin(string s) {
  string cpy = s;
  reverse(cpy.begin(), cpy.end());
  return cpy == s;
}
void leftrotate(string &s, int d) {
  reverse(s.begin(), s.begin() + d);
  reverse(s.begin() + d, s.end());
  reverse(s.begin(), s.end());
}
void rightrotate(string &s, int d) { leftrotate(s, s.length() - d); }
bool isdis(int n) {
  string s = to_string(n);
  int arr[10] = {0};
  for (int i = 0; i < s.length(); i++) {
    arr[s[i] - '0']++;
  }
  for (int i = 0; i < 10; i++) {
    if (arr[i] > 1) {
      return false;
    }
  }
  return true;
}
void ans(long long int n) {
  set<long long int> s;
  while (n % 2 == 0) {
    s.insert(2);
    n = n / 2;
  }
  for (long long int i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      s.insert(i);
      n = n / i;
    }
  }
  if (n > 2) {
    s.insert(n);
  }
  long long int answer = 1;
  for (auto it = s.begin(); it != s.end(); it++) {
    answer *= *it;
  }
  cout << answer << endl;
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int aku;
  cin >> aku;
  ans(aku);
  return 0;
}
