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