#include <bits/stdc++.h>
using namespace std;
long long k, cons = 0;
long long arr[200000];
int prime(long long x) {
  int truee = 0, t;
  for (k = 2; k * k <= x; k++) {
    if (x % k == 0) {
      truee = 1;
      arr[t] = k;
      if (t >= 1) {
        if ((arr[t] - arr[t - 1]) == 1) {
          cons = 1;
          break;
        }
      }
      t++;
    }
  }
  if (truee == 1) {
    return 0;
  } else {
    return 1;
  }
}
long long gcd(long long a, long long b) {
  if (a < b)
    return gcd(b, a);
  else if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  long long t, n, i;
  t = 1;
  while (t--) {
    long long maxiindex, miniindex, maxi = INT_MIN, mini = INT_MAX, value = 0,
                                    left = 0, right = 0, breaks = 0;
    set<int> s;
    long long arr2[100000], l[100000], r[100000], ans = 0, sol, count;
    cin >> n;
    count = n;
    for (i = 1; i < sqrt(n) + 1; i++) {
      if (n % i == 0) {
        if (i > 1) count = gcd(count, i);
        if (n / i > 1) count = gcd(count, n / i);
      }
    }
    cout << count;
  }
}
