N = int(input()) A = map(int, input().split(' ')) MOD = sum(A) % N ans = len([i for i in range(101) if i % N == (N - MOD)]) print(ans)