n=int(input()) a=list(map(int,input().split())) for i in range(61): if all((v>>i)&1==0 for v in a): print(1<