n=int(input()) if n==1: print(101) else: l=[int(i)for i in input().split()] s=[i for i in range(101)if i%n==(n-(sum(l)%n))%n] print(len(s))