import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); long x = sc.nextLong(); HashMap map = new HashMap<>(); for (long i = 2; i <= Math.sqrt(x); i++) { while (x % i == 0) { if (map.containsKey(i)) { map.put(i, map.get(i) + 1); } else { map.put(i, 1); } x /= i; } } if (x != 1) { if (map.containsKey(x)) { map.put(x, map.get(x) + 1); } else { map.put(x, 1); } } long ans = 1; for (Map.Entry entry : map.entrySet()) { if (entry.getValue() % 2 == 1) { ans *= entry.getKey(); } } System.out.println(ans); } }