typedef long long ll; typedef long double ld; #include using namespace std; #define int long long signed main(){ ll n,w; std::cin >> n>>w; vector a(n); for (int i = 0; i < n; i++) { std::cin >> a[i]; } ll ans = 0; for (int i = 0; i < (1< kon; for (int j = 0; j < n; j++) { if(i>>j&1){ sum += a[j]; kon.push_back(a[j]); } } if(sum==w){ ans++; continue; }else{ bool ok = false; for (int j = 0; j < (1<>k&1)sum2+=kon[k]/2; } if(sum-sum2==w)ok=true; } if(ok)ans++; } } std::cout << ans << std::endl; }