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