let N = stdin.ReadLine().Trim() |> int64 let XS = stdin.ReadLine().Split(' ') |> Array.map int64 let odds = Array.fold (fun acc n -> if n % 2L <> 0L then acc + 1L else acc) 0L XS let evens = (XS.Length |> int64) - odds printfn "%d" <| abs (odds - evens)