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