N, *A = map(int, open(0).read().split()) su = sum(A) cnt = 0 for i in range(0, 101): if (su + i) % N == 0: cnt += 1 print(cnt)