import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long X = sc.nextLong(); long Y = 1L; int c=0; while(X%2==0){ X/=2; c++; } if(c%2==1){ Y*=2; } long A = (long)Math.sqrt(X); for(long i=3; i<=A; i+=2){ c=0; while(X%i==0){ X/=i; c++; } if(c%2==1){ Y*=i; } } Y*=X; System.out.println(Y); } }