package com.company; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); final long X = sc.nextLong(); long rest = X; long answer = 1; for(long i = 2; i * i <= rest; i++){ int count = 0; while(rest % i == 0){ rest /= i; count++; } if(count % 2 != 0){ answer *= i; } //System.out.println(i + " : " + answer); } if(rest > 1){ answer *= rest; } System.out.println(answer); } }