N, A = list(map(int, input().split()))

X = [int(x) - A for x in input().split()]



import functools

@functools.lru_cache(maxsize=None)

def f(acc, left):

    if not left: return 0

    ret = 0

    y = acc + left[0]

    ret += 1 if y == 0 else 0

    ret += f(y, left[1:])

    ret += f(acc, left[1:])

    return ret

print((f(0, tuple(X))))
N, A = list(map(int, input().split()))

X = [int(x) - A for x in input().split()]



from collections import Counter



total = Counter([0])

for x in X:

    mix = Counter()

    for i, cnt in list(total.items()):

        mix[i + x] += cnt

    total += mix



print((total[0] - 1))
N, A = list(map(int, input().split()))
X = [int(x) - A for x in input().split()]
import functools


@functools.lru_cache(maxsize=None)
def f(acc, left):
    if not left:
        return 0
    ret = 0
    y = acc + left[0]
    ret += 1 if y == 0 else 0
    ret += f(y, left[1:])
    ret += f(acc, left[1:])
    return ret


print((f(0, tuple(X))))

N, A = list(map(int, input().split()))
X = [int(x) - A for x in input().split()]
from collections import Counter

total = Counter([0])
for x in X:
    mix = Counter()
    for i, cnt in list(total.items()):
        mix[i + x] += cnt
    total += mix
print((total[0] - 1))

-import functools +from collections import Counter - -@functools.lru_cache(maxsize=None) -def f(acc, left): -    if not left: -        return 0 -    ret = 0 -    y = acc + left[0] -    ret += 1 if y == 0 else 0 -    ret += f(y, left[1:]) -    ret += f(acc, left[1:]) -    return ret - - -print((f(0, tuple(X)))) +total = Counter([0]) +for x in X: +    mix = Counter() +    for i, cnt in list(total.items()): +        mix[i + x] += cnt +    total += mix +print((total[0] - 1))