import sys input = sys.stdin.readline N=int(input()) A=list(map(int,input().split())) flag=0 K=1<<63 if N==1: flag=1 for i in range(30): x=1<