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