n = int(input()) an = map(int,input().split()) count = 0 for i in range(101): if (sum(an)+i)%n==0: count+=1 print(count)