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