let n = readLine()!
let an = readLine()!.characters.split(" ").map { Int(String($0))! }
for i in 0... {
    let s = an.map { a in
        (a % 2 == 0) ? (a / 2) : nil
    }
    if s.filter({$0 == nil}).isEmpty {
        continue
    }else {
        print(i)
        break
    }
}
