A Fat Wallet (AOJ 0296) by ynu_d
Contest: 3421    RunID: 2277056    Status: Accepted    Date: Sun Apr 23 15:39:05 JST 2017


#include <bits/stdc++.h>
#include<algorithm>
using namespace std;

int main(){
    int c1,c5,c10,c50,c100,c500;
    cin >>c1>>c5>>c10>>c50>>c100>>c500;
    if(c1+5*c5+10*c10+50*c50+100*c100+500*c500>=1000){
        cout<<1<<endl;
    }
    else{
        cout <<0<<endl;
    }
    return 0;
}