Tak has N cards. On the i-th (1 \leq i \leq N) card is written an integer x_i. He is selecting one or more cards from these N cards, so that the average of the integers written on the selected cards is exactly A. In how many ways can he make his selection?
#!/usr/bin/env python3
#ABC44 C

import sys
import math
import bisect
from heapq import heappush, heappop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
mod = 10**9 + 7

n,a = map(int, input().split())
X = list(map(int,input().split()))
Y = list(map(lambda x:x-a, X))
d = defaultdict(int)
d[0] = 1
print(Y)
for y in Y:
    for k,v in list(d.items()):
        d[k+y] += v
print(d[0]-1)

#!/usr/bin/env python3
#ABC44 C

import sys
import math
import bisect
from heapq import heappush, heappop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
mod = 10**9 + 7

n,a = map(int, input().split())
X = list(map(int,input().split()))
Y = list(map(lambda x:x-a, X))
d = defaultdict(int)
d[0] = 1
for y in Y:
    for k,v in list(d.items()):
        d[k+y] += v
print(d[0]-1)

