#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;
    if (a == b and b == c and c == d and d == e) cout << 4;
    return 0;
}


