import java.io.*; import java.util.*; class Main { public static void out (Object o) { System.out.println(o); } public static boolean isPrime (long n) { for (int i = 3; i * i <= n; i += 2) { if (n % i == 0) return false; } return true; } public static long solve (long n) { int max = 12 , m = 0; long[] p = new long[max]; int[] cntP = new int[max]; if (n % 2 == 0) { long k = n; p[m] = 2; while (k % 2 == 0) { k /= 2; cntP[m]++; } m++; } long q = n; for (long i = 3; i * i <= n; i += 2) { if (q % i == 0) { p[m] = i; while (q % i == 0) { q /= i; cntP[m]++; } m++; } } if (m == 0) return n; //out(Arrays.toString(p)); //out(Arrays.toString(cntP)); long ret = 1; for (int i = 0; i < m; i++) { if (cntP[i] % 2 == 0) continue; ret *= p[i]; } return ret; } public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); out(solve(Long.parseLong(br.readLine()))); } }