#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int _inf = 0xc0c0c0c0;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const long long _INF = 0xc0c0c0c0c0c0c0c0;
const long long mod = (int)1e9 + 7;
const int N = 2e5 + 100;
const int M = N << 1;
long long n;
vector<long long> vc;
int main() {
  scanf("%lld", &n);
  if (n == 1) vc.push_back(1);
  for (long long i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      vc.push_back(i);
      while (n % i == 0) n /= i;
    }
  }
  if (n > 1) vc.push_back(n);
  if (vc.size() > 1)
    puts("1");
  else {
    printf("%lld\n", vc[0]);
  }
  return 0;
}
