#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n;
  cin >> n;
  int count = 0;
  long long int p = 1;
  for (long long int x = 2, m = n; x * x <= m; ++x) {
    if (n % x == 0) {
      count++;
      p = x;
      do {
        n /= x;
      } while (n % x == 0);
    }
  }
  if (n > 1) {
    p = n;
    count++;
  }
  if (count > 1) {
    cout << "1\n";
  } else {
    cout << p << '\n';
  }
  return 0;
}
