#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 3;
const int INF = 1e9;
const int MOD = 1e9 + 7;
int main() {
  long long n;
  long long ans = 1;
  cin >> n;
  long long p = 2;
  while (n > 1 && p * p <= n) {
    if (n % p)
      p++;
    else {
      n /= p;
      if (ans % p) ans *= p;
    }
  }
  if (ans % n) ans *= n;
  cout << ans << endl;
  return 0;
}
