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