#include<bits/stdc++.h>
#define sci(a) scanf("%d", &a)
#define scii(a, b) scanf("%d %d", &a, &b)
#define pri(a) printf("%d ", a)
#define pril(a) printf("%d\n", a)
#define fto(i, a, b) for(int i = a; i <= b; ++i)
#define fdto(i,a ,b) for(int i = a; i >= b; --i)
#define pb(a) push_back(a)
#define ff first
#define ss second
#define maxN 55
#define oo 1000000007
using namespace std;
int n, k, a[maxN], b[maxN];
long long res;




void check() {
    int sum = 0, cnt = 0;
    fto(i, 1, n) {
        if(b[i]) {
            sum += a[i];
            ++cnt;
        }
    }
    if(sum != 0) {
        if((double)sum / cnt == k) {
            ++res;
        }
    }
}


void sinh(int i) {
    if(i > n) {
        check();
        return;
    }

    b[i] = 0;
    sinh(i + 1);
    b[i] = 1;
    sinh(i + 1);

}


void solveT1() {
    sinh(1);
    pril(res);
}



int main() {
    //freopen("c.inp", "r", stdin);
    //freopen("c.out", "w", stdout);
    scii(n, k);
    fto(i, 1, n) sci(a[i]);
    if(n <= 20) {
        solveT1();
        return 0;
    }
}
