import java.util.Map; import java.util.Scanner; import java.util.TreeMap; public class Main { @SuppressWarnings("resource") public static void main(String args[]) { Scanner scanner = new Scanner(System.in); long x = scanner.nextLong(); Map map = prime_fact(x); long ans = 1; for (long key : map.keySet()) { if (map.get(key) % 2 == 1) { ans *= key; } } System.out.println(ans); } private static Map prime_fact(long x) { Map map = new TreeMap<>(); double d = Math.sqrt(x); for (int i = 2; i <= d; i++) { int cnt = 0; while (x % i == 0) { x /= i; cnt++; } map.put((long) i, cnt); } map.put(x, 1); return map; } }