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