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