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