open Batteries

let rec count n = if n mod 2 = 1 then 0 else 1 + count (n / 2)

let () =
  let n = Scanf.scanf "%d" (fun x -> x) in
  List.init n (fun _ -> Scanf.scanf " %d" count)
  |> List.fold_left (+) 0 |> Printf.printf "%d\n"