Scanf.scanf "%d" (fun n ->
    let a = Array.init n (fun _ -> Scanf.scanf " %d" (fun a -> a)) in
    let calc t =
        let rec loop i acc =
            if i mod 2 = 0 then loop (i lsr 1) (acc + 1) else acc
        in
        loop t 0
    in
    Array.fold_left (fun acc v -> acc + calc v) 0 a |> Printf.printf "%d\n"
)