N=int(input()) D=list(map(int,input().split())) inf=1<<30 dp=[-inf]*(1<0: dp[bit]=max(dp[bit],min(dp[bit^1<0: dp[bit]=max(dp[bit],dp[bit^1<