let rec non_square n i = if n mod 4 = 0 then non_square (n / 4) 3 else if i * i > n then n else if n mod (i * i) = 0 then non_square (n / (i * i)) i else non_square n (i + 2) let () = print_int (non_square (int_of_string (read_line ())) 3)