import Foundation

func check(arr: [Int]) -> Bool {
    for i in arr {
        if i.isMultiple(of: 2) == false {
            return false
        }
    }
    return true
}

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

while check(arr: b) {
    count += 1
}
print(count)