n=int(input()) a=list(map(int,input().split())) b=[0]*n;ans=0 for i in range(60,-1,-1): x=1<