N = int(input()) if N>1: A = list(map(int, input().split())) else: A = [] S = sum(A) cnt = 0 for i in range(101): if (S+i)%N==0: cnt+=1 print(cnt)