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; long[] factor = new long[10]; int[] count = new int[10]; int index = 0; while(n != 1 && n % 2 == 0){ if(n % 2 == 0){ factor[index] = 2; while (n % 2 == 0){ count[index]++; n /= 2; } index++; } } for (long i = 3; i * i <= n; i += 2){ if (n % i == 0){ factor[index] = i; while(n % i == 0){ count[index]++; n /= i; } index++; } } if (index == 0){ System.out.println(nd); return; } long answer = 1; for (int i = 0; i < index; i ++){ if(count[i] % 2 == 1){ answer *= factor[i]; } } System.out.println(answer * n); } }