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