import sys readline=sys.stdin.readline N=int(readline()) W=list(map(int,readline().split())) dp=1 for w in W: dp|=dp<