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