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, i; for (i = 2; i < 1000000; i++) { if (x % (i * i) == 0) { x /= (i * i); } } System.out.println(x); } }