s=[] a=int(input()) s=int(input()).split() S=sum(s) for i in range(100): if (S+i)%a == 0: k+=1 print(k)