#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N, n, a[1001], idx = 1, flag = 1;
  vector<long long> factors;
  scanf("%lld", &N);
  if (N < 4) {
    printf("%I64d\n", N);
    return 0;
  }
  n = N;
  if (n % 2 == 0) {
    factors.push_back(2);
    while (n % 2 == 0) {
      n /= 2;
    }
  }
  for (long long i = 3; i <= sqrt(N); i += 2) {
    if (n % i == 0) {
      factors.push_back(i);
      while (n % i == 0) {
        flag = 2;
        n /= i;
      }
    }
  }
  if (n > 2) {
    factors.push_back(n);
  }
  if (factors.size() == 1) {
    printf("%I64d\n", factors[0]);
  } else {
    if (N % 2 == 0) {
      if (factors.size() > 1) {
        printf("1\n");
      } else {
        printf("2\n");
      }
    } else {
      printf("1\n");
    }
  }
  return 0;
}
