#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int k, i, a, b, r;
  cin >> k;
  long long int div = k;
  for (i = 2; i * i < k; i++)
    if (k % i == 0) {
      a = i;
      b = div;
      while (b) {
        r = a % b;
        a = b;
        b = r;
      }
      div = a;
      a = k / i;
      b = div;
      while (b) {
        r = a % b;
        a = b;
        b = r;
      }
      div = a;
    }
  if (i * i == k) {
    a = i;
    b = div;
    while (b) {
      r = a % b;
      a = b;
      b = r;
    }
    div = a;
  }
  cout << div;
  return 0;
}
