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