#include <bits/stdc++.h>
long long v[50 * 101][51];
using namespace std;
signed main() {
  long long N, A;
  cin >> N >> A;
  long long x;
  std::vector<long long> y(N);
  for (long long i = 0; i < N; i++) {
    cin >> x;
    y[i] = x - A;
    cout << y[i] << endl;
  }
  for (long long i = 0; i < N * 101; i++)
    for (long long j = 0; j < N; j++) v[i][j] = 0;
  v[N * 50][0] = 1;
  for (long long j = 1; j < N + 1; j++) {
    for (long long i = 50; i < N * 101 - 50; i++) {
      v[i][j] = v[i][j - 1] + v[i - y[j - 1]][j - 1];
    }
  }
  cout << v[N * 50][N] - 1 << endl;
}
