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