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