n=int(input()) v=list(map(int,input().split())) dp=[] if 1