import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); long X = scan.nextLong(); scan.close(); long x = (long)Math.sqrt(X); if(x * x == X) { System.out.println(1); }else { long y = 4; long k = 2; while(y < X) { if(X % y == 0) { X = X / y; } k++; y = k * k; } System.out.println(X); } } }