.
#include <iostream>
#include <vector>
using namespace std;
int n, s;
vector<int> v;
int cnt = 0;
void Func(int idx, int temp)
{
if (idx == n) return;
if (v[idx] + temp == s) cnt++;
Func(idx + 1, temp);
Func(idx + 1, v[idx] + temp);
}
int main(int argc, char* argv[])
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
cin >> n >> s;
for (int i = 0; i < n; i++)
{
int input;
cin >> input;
v.push_back(input);
}
Func(0, 0);
cout << cnt;
return 0;
}