import Foundation



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

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

    
    
}

print(count)