n=int(input()) if n>1: *a,=map(int,input().split()) s=sum(a) l=len([i for i in range(101) if (s+i)%n==0]) print(l) else: print(101)