#include <bits/stdc++.h>
using namespace std;
inline void print(char pt) { printf("%c\n", pt); }
inline void print(int pt) { printf("%d\n", pt); }
inline void print(long long pt) { printf("%I64d\n", pt); }
inline void print(double pt) { printf("%f\n", pt); }
inline void print(char pt[]) { printf("%s\n", pt); }
inline void scan(int &pt) { scanf("%d", &pt); }
inline void scan(long long &pt) { scanf("%I64d", &pt); }
inline void scan(double &pt) { scanf("%lf", &pt); }
inline void scan(char pt[]) { scanf("%s", pt); }
struct pii {
  int a;
  int b;
  friend int operator<(pii a, pii b) {
    if (a.a != b.a) return a.a < b.a;
    return a.b < b.b;
  }
} p[10000];
long long n, m, k;
int tmp, old;
char if_heshu[1000050];
int a[10000];
int aa, bb;
int flag0;
int main() {
  scan(n);
  int sqn = sqrt(n) + 1;
  for (int i = 2; i <= sqn; i++) {
    if (if_heshu[i]) continue;
    for (int j = i + i; j <= sqn; j += i) {
      if_heshu[j] = 1;
    }
    if (n % i == 0) {
      while (n % i == 0) {
        n /= i;
      }
      n *= i;
    }
  }
  print(n);
  return 0;
}
