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