#include using namespace std; int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); int n, w; cin >> n >> w; vector a(n); for(auto&e:a) cin >> e; long ans = 0; for(int i = 0; i < 1 << n; i++) { bool ok = false; vector t; for(int j = 0; j < n; j++) if(i >> j & 1) t.push_back(j); for(int j = 0; j < 1 << (int)t.size(); j++) { long s = 0; for(int k = 0; k < (int)t.size(); k++) { if(j >> k & 1) s += a[t[k]]/2; else s += a[t[k]]; } ok |= s == w; if(ok)break; } ans += ok; } cout << ans << "\n"; }