fun numOfexp2(num:Long) :Long {
    var n = 0L
    var number = num
    while (number % 2 == 0L) {
        n += 1
        number /= 2
    }
    return n
    
}
// fun numOfexp2(num:Long) = Math.floor(Math.log(num.toDouble())/Math.log(2.0)).toLong()

fun main(args:Array<String>) {
    val N = readLine()!!.toInt()
    val a_series = readLine()!!.split(" ").map(String::toLong)
    // val odd_list = a_series.filter { it % 2 == 1 }
    val even_list = a_series.filter { it % 2 == 0L }
    if(even_list.size == 0) {
        println(0)
        return
    }

    when(even_list.size) {
        0 -> 0
        else -> {
            // val min_even = even_list.minBy{numOfexp2(it)}!!
            // val max_even = even_list.maxBy{numOfexp2(it)}!!
            // // 2*numOfexp2(max_even)-numOfexp2(min_even)
            // numOfexp2(max_even)
            even_list.map {it-> numOfexp2(it)}.fold(0L) {sum,ele -> sum+ele}
        }
    }.let(::println)

}