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