A Fat Wallet (AOJ 0296) by ynu_c
Contest: 3421    RunID: 2277055    Status: Wrong Answer    Date: Sun Apr 23 15:39:04 JST 2017


#include<bits/stdc++.h>
using namespace std;
int main(){
    int c1,c50,c10,c100,c500;
    cin>>c1>>c10>>c50>>c100>>c500;
    if(c1+10*c10+50*c50+100*c100+500*c500>=1000){
       cout<<1<<endl;
    }
    else{
        cout<<0<<endl;
    }
    return 0;
}