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

void main(){
	// input
	int[] input;
	input.length = 4;

	foreach(ref i; input) {
		i = to!int(readln().chomp());
	}

	immutable int five_hund = input[0];
	immutable int hund = input[1];
	immutable int fifty = input[2];
	immutable int sum_num = input[3];

	writeln(get_all_paterns(five_hund, hund, fifty, sum_num));


}

int get_all_paterns(int five_hund, int hund, int fifty, int sum_num){
	int result;

	foreach(fh_num; iota(0,five_hund+1)) {
		foreach(h_num; iota(0, hund+1)) {
			foreach(f_num; iota(0, fifty+1)) {
				if(500 * fh_num + 100 * h_num + 50 * f_num == sum_num){
					result++;
				}
			}
		}
	}

	return result;	
}