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