import java.util.*; import java.io.*; import java.math.*; public class No300 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long x = sc.nextLong(); int s = 2; int c = 0, y = 1; while(x > 1) { // System.out.println("x = " + x + ", c = " + c + ", y = " + y); if(x%s == 0) { c += 1; x = x/s; }else { if(c%2 != 0) { y *= s; } s += 1; c = 0; } } if(c%2 != 0) y *= s; System.out.println(y); } }