N,A = [int(i) for i in input().split()]
x = [0]*N
x = [int(i) for i in input().split()]
a = []

for i in range(1,N+1):
    tot = [0]*(N-i+1)
    for j in range(N-i+1):
        if j == 0:
            tot[j] = sum([x[k] for k in range(i)])
        else:
            tot[j] = tot[j-1] + x[j+-1] - x[j-1]
    a = a + [k/i for k in tot]

count = 0
print(sum([1 if i == A else 0 for i in a]))