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