import java.util.Scanner; public class Yukicoder300 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long x = sc.nextLong(), y = 1; double z; for (int i = 2; i < 10000; i++) { if (x % (i * i) == 0) x /= (i * i); } for (y = 1; y <= x; y++) { z = (int) Math.sqrt(x * y); if (z * z == x * y) break; } System.out.println(y); } }