import java.util.Scanner; public class Test { public static Scanner sc = new Scanner(System.in); public static void main(String[] args) { long n = sc.nextLong(); for(long t = 2; t*t <= n;){ if(n % (t*t) == 0){ n /= t*t; } else { t++; } } System.out.println(n); } }