#include <iostream>
using namespace std;

int main()
{
    int a = 0, b = 0, c = 0, d = 0, e = 0;
    int f = 0, x = 0;
    cin >> a >> b >> c >> d >> e;
    f = a * a * 6 + b * b * 6 + c * c * 6 + d * d * 6;
    x = e * e * 6;
    if (x >= f)
    {
        cout << 1;
    }
    return 0;
}
