import java.util.*; import java.io.*; public class Exercise68{ public static void main (String[] args) throws IOException{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String nStr = new String(in.readLine()); long n = Long.parseLong(nStr); long sq = (long)Math.sqrt((double)n); HashMap factor = new HashMap(); long answer = 1; for(long i = 2; i <= sq; i++){ int count = 0; while (n % i == 0){ n /= i; count++; } if(count > 0){ factor.put(i, count); } } for (Map.Entry entry : factor.entrySet()){ if(entry.getValue() % 2 == 1){ answer *= entry.getKey(); } } System.out.println(answer); } }