import java.nio.channels.AsynchronousServerSocketChannel; import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long n = sc.nextLong(); HashMap map = new HashMap<>(); for(long i=2;i*i<=n;i++){ while(n%i==0){ n/=i; if(map.containsKey(i)){ map.put(i, map.get(i)+1); }else{ map.put(i,1); } } } long ans = 1; for(long l : map.keySet()){ if(map.get(l)%2!=0) ans*=l; } System.out.println(ans); } }