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 nd = Long.parseLong(nStr); long n = nd; HashMap factor = new HashMap(); while(n != 1 && n % 2 == 0){ if(factor.containsKey(2)){ factor.put((long)2, factor.get(2) + 1); }else{ factor.put((long)2, 1); } n /= 2; } for (long i = 3; i * i <= n; i += 2){ while(n % i == 0){ if(factor.containsKey(i)){ factor.put(i, factor.get(i) + 1); }else{ factor.put(i, 1); } n /= i; } } if (factor.size() == 0){ System.out.println(nd); return; } long answer = 1; for (Map.Entry entry : factor.entrySet()){ if(entry.getValue() % 2 == 1){ answer *= entry.getKey(); } } System.out.println(answer * n); } }