

let a = Int(readLine()!)!
var b = readLine()!.split(separator: " ")
    .map({Int($0)!})
var count = 0

while true {
    b = b.map{$0/2}.filter{$0.isMultiple(of: 2)}
    if b.count != a {
        print(b)
        break
    }
    
print(b)

    
    count += 1
}

print(count)