program main
  implicit none
  integer :: n, i, res
  integer, allocatable :: a(:)
  read(*, *) n
  allocate(a(n))
  read(*, *) a(:)
  res = 0
  do i = 1, n
    res = res + count_two(a(i))
  end do
  write(*, "(i0)") res
  deallocate(a)
  contains
  function count_two(d)
    implicit none
    integer, intent(in) :: d
    integer :: count_two, i, d2
    count_two = 0
    d2 = d
    do i = 1, 100
      if (mod(d2, 2) == 0) then
        count_two = count_two + 1
        d2 = d2 / 2
      else
        exit
      end if
    end do
  end function count_two
end program main
