#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
const ll inf = 2e9;
using namespace __gnu_pbds;
#define all(x) x.begin(), x.end()
template <class t> using oset = tree<t, null_type, less <t>, rb_tree_tag, tree_order_statistics_node_update>;
int main(){
    cin.tie(0)->sync_with_stdio(0);
    ll n;
    cin >> n;
    vector <ll> v(n);
    for (auto &x : v) cin >> x;
    if (accumulate(all(v), 0LL) >= k) cout << "1\n";
    else cout << "0\n";
}