#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <string>
#include <set>
#include <cmath>

#define ll long long
#define sz size()
#define cY cout << "YES" << endl;
#define cN cout << "NO" << endl;
#define pb push_back
#define F first
#define S second
#define FASTIO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);

/*
"0.000..."   setprecision(---) + fixed
"USACO"      freopen("---", "r", stdin); freopen("---", "w", stdout);
"Matrix"     vector <vector <int>> ---(---, vector <int> (---));
"NOD"        __gcd
"NOK"        a * b / __gcd(a,b)
*/

using namespace std;

int main() {
    FASTIO
    ll T_T = 1;
    //cin >> T_T;
    while (T_T--) {
        ll n, k;
        cin >> n >> k;

        vector <ll> a(n);
        ll sum = 0;
        for (int i = 0; i < n; i++) {
            cin >> a[i];
            sum += a[i];
        }

        if (sum < k) {
            cout << 0 << endl;
        }
        else {
            cout << 1 << endl;
        }
    }
}