#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  long long cnt = 0;
  long long div = 1;
  long long tmp = n;
  for (long long i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      div = i;
      cnt++;
      while (n % i == 0) {
        n /= i;
      }
    }
    if (cnt > 1) {
      cout << 1;
      return 0;
    }
  }
  if (n > 1) {
    cnt++;
    div = tmp;
  }
  if (cnt > 1) {
    cout << 1;
    return 0;
  } else {
    cout << div;
  }
}
