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