#include <iostream>
using namespace std;
int main()
{
    long long strani[4],E;
    for (int j=0; j<4; j++)
    {
        cin>>strani[j];
    }
    cin>>E;

    if ( ( strani[2]+strani[3] ) <= E )
    {
        cout<<"1"<<endl;
    }

    for (int j=4; j>0; j--)
    {
        if (strani[j])
        {
        }
    }

    return 0;
}
