let inputs = System.Console.ReadLine().Split(' ') let args = [for str in inputs do yield int(str) ] let rec contains f lt = match lt with | [] -> false | x::xs -> if f x then true else contains f xs let rec filter f lt = match lt with | [] -> [] | x::xs -> if f x then [x] @ (filter f xs) else filter f xs let contests = [23..25] let dups = filter (fun x -> contains (fun y -> y = x ) contests ) [ (List.head args) .. (List.item 1 args) ] printfn "%i" (contests.Length - dups.Length)