import java.util.Arrays; import java.util.Scanner; public class Yukicoder300 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int cnt; long x = sc.nextLong(), y = 1; int num = 50000000; boolean[] p = new boolean[num]; Arrays.fill(p, true); for (int i = 2; i < num; i++) { if (p[i]) { for (int j = 1; j * i < num; j++) { p[j * i] = false; } cnt = 0; while (x % i == 0) { x /= i; cnt++; } if (cnt % 2 == 1) y *= i; if (x == 1) break; } } System.out.println(y); } }