unittest
{
	assert( [ "2", "2", "2", "100" ].parse.expand.solve == 2 );
	assert( [ "5", "1", "0", "150" ].parse.expand.solve == 0 );
	assert( [ "30", "40", "50", "6000" ].parse.expand.solve == 213 );
}



import std.conv;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto a = input.front.strip.to!( long );
	input.popFront;
	auto b = input.front.strip.to!( long );
	input.popFront;
	auto c = input.front.strip.to!( long );
	input.popFront;
	auto x = input.front.strip.to!( long );
	return tuple( a, b, c, x );
}

auto solve( long a, long b, long c, long x )
{
	auto r = 0L;
	
	auto am = a * 500;
	auto bm = b * 100;
	auto cm = c * 50;
	
	for( auto ai = 0; ai <= am && ai <= x; ai += 500 )
	{
		if( ai + bm + cm < x ) continue; 
		
		for( auto bi = 0; bi <= bm && ai + bi <= x; bi += 100 )
		{
			if( ai + bi + cm < x ) continue; 
			r++;
		}
	}
	
	return r;
}
