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