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