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