let solve dlst = let rec solve' lst cur = match lst with | [] -> 10 | x::xs -> if x <> cur then cur else solve' xs (cur + 1) in solve' dlst 1 let () = let blst = read_line () |> Str.split (Str.regexp_string " ") |> List.map int_of_string in solve blst |> string_of_int |> print_endline