package com.company; import java.util.HashSet; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); long a = scanner.nextLong(); HashSet hashSet = new HashSet(); for(int i = 2;i*i<=a;i++) { int count = 0; while(a % i == 0) { a /= i; count++; } if(count % 2 == 1) { hashSet.add(i); } } long y = 1; for(Integer element : hashSet) { y *= (long)element; } System.out.println(y); } }