#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const int inf = 1e9;
const long long INF = 1LL << 60;
int main() {
  int n, a;
  cin >> n >> a;
  int x[n];
  for (int i = 0; i < (int)(n); i++) {
    cin >> x[i];
    x[i] -= a;
  }
  long long ans = 0;
  for (int bit = 0; bit < (1 << n); bit++) {
    int tmp = 0;
    for (int i = 0; i < (int)(n); i++) {
      if (bit & (1 << i)) tmp += x[i];
    }
    if (tmp == 0) ans++;
    ans %= mod;
  }
  cout << ans - 1 << endl;
}
