import itertools

ans = 0

N, A = map(int, raw_input().split())

x = map(int, raw_input().split())

for i in range(N):
  for element in itertools.combinations(x, i + 1):
    if sum(element) / (i + 1.0) == A:
      ans += 1

print ans