#include <iostream>
using namespace std;
int main ()
{
    int a,b,c,d,e;
    cin >> a >> b >> c >> d >> e;
    if (a * a * a + b * b * b + c * c * c + d * d * d < e * e * e) cout << 1;
    return 0;
} 
