# T = int(input())
# numbers = [int(s) for s in input().split(" ")]
# maxi = 0
# for i in range(0,len(numbers)):
#     lol = numbers.count(numbers[i])
#     if lol>maxi:
#         maxi = lol
#
# print(maxi)
import math
n, q = [int(s) for s in input().split(" ")]
numbers = [int(s) for s in input().split(" ")]
queries = []
for i in range(0,q):
    queries.append(bin(int(input())))

print(math.log(numbers[2],2))