N = int(input()) Asum = sum(map(int, input().split())) ans = 0 for i in range(101): if (Asum + i) % N == 0: ans += 1 print(ans)