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