N=int(input()) p=map(int,input().split()) m=0 for n in p: m |= n for i in range(99): if m>>i&1==0: break print(1<