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