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