import sys read=sys.stdin.buffer.read readline=sys.stdin.buffer.readline readlines=sys.stdin.buffer.readlines n=int(readline()) d=list(map(int, readline().split())) dp=[0]*(1<0: x1=min(x+y, (t+1)*100) if dp[i^(1<