A Fat Wallet (AOJ 0296) by ynu_c
Contest: 3421    RunID: 2277062    Status: Accepted    Date: Sun Apr 23 15:40:43 JST 2017


#include<bits/stdc++.h>
using namespace std;
int main(){
    int c1,c5,c50,c10,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;
}