N = int(input()) if N == 1: print(101) exit() 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)