import java.util.ArrayList; import java.util.Scanner; public class Main299 { public static void main(String[] args) { new Main299(); } public Main299() { Scanner sc = new Scanner(System.in); long x = sc.nextLong(); System.out.println(solve(x)); } public long solve(long x) { long res = 1; for (long i = 2; i * i < (10e+12) + 1; i++) { int count = 0; while (x % i == 0) { x /= i; count++; } res *= count % 2 == 1 ? i : 1; } return res; } }