#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, t, i, j, x, y, sum = 0, mn, mx, c, Lcm, gc, ans = 0, rb,
                                     flag, cont = 0, findex = -1, e, prev, d,
                                     total, z, a;
  long long int odd, even, rem, k, l, flag1;
  long long slen;
  cin >> n;
  x = n;
  m = 1;
  for (i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      m = i;
      while (n % i == 0) {
        n = n / i;
      }
      break;
    }
  }
  if (x == n) {
    cout << x;
  } else {
    if (n == 1)
      cout << m;
    else
      cout << 1;
  }
}
