#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, n, i, k;
  cin >> n >> a;
  int x[n];
  cout << "ok";
  for (i = 0; i < n; i++) {
    cin >> x[i];
    x[i] -= a;
  }
  cout << "ok";
  int beki[n];
  beki[0] = 1;
  for (i = 1; i < n; i++) {
    beki[i] = beki[i - 1] * 2;
  }
  cout << "ok";
  int check, ans, now;
  ans = 0;
  check = 1 << n;
  now = 0;
  int sum[check];
  sum[0] = 0;
  for (i = 1; i < check; i++) {
    if (beki[now] < i) {
      now++;
    }
    sum[i] = x[now] + sum[i - beki[now]];
    if (sum[i] == 0) {
      ans++;
    }
  }
  cout << ans;
  cout << check;
}
