let () =
  Scanf.scanf "%d\n%d\n%d\n%d\n" @@ fun a b c x ->
  let ans = ref 0 in
  for i = 0 to a do
    for j = 0 to b do
      for k = 0 to c do
        if 500 * i + 100 * j + 50 * k = x then ans := !ans + 1
      done;
    done;
  done;
  Printf.printf "%d\n" !ans