n=int(input()) v=[int(i) for i in input().split()] dp=[0]*n if 1