n=int(input()) a=list(map(int,input().split())) for j in range(100): f=True for i in range(n): f&=(a[i]&(1<