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