N = int(input()) A = list(map(int, input().split())) ans = 0 s = sum(A) for x in range(0, 101): if (s + x) % N == 0: ans += 1 print(ans)