import java.util.Scanner; public class Main_yukicoder300 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long x = sc.nextLong(); long ret = 1; for (long i = 2; i * i <= x; i++) { int tmp = 0; while (x % i == 0) { tmp++; x /= i; } if (tmp % 2 == 1) { ret *= i; } } System.out.println(ret * x); sc.close(); } }