import numoy as np
N,M = list(map(int,input().split()))
A = input().split()

count = 0
A = np.array(A,dtype='int64')
B = np.cumsum(A)
C = np.append([0],B)

L = (1 for i in range(N+1) for t in range(N+1))
print(len(list(L)))