n=int(input()) s=sum(map(int,input().split())) c=0 for i in range(100): if (s+i)%n<1:c+=1 print(c)