let fold_int f a n =
  let rec fold f a i n =
    if i >= n then
      a
    else
      fold f (f a i) (i + 1) n
  in
    fold f a 0 n

(* O(n^3) (n = max {a, b, c}) *)
let solve a b c x =
  fold_int
    (fun sofar_a i ->
      fold_int
        (fun sofar_b j ->
          fold_int
            (fun sofar_c k ->
              if 500 * i + 100 * j + 50 * k = x then
                sofar_c + 1
              else
                sofar_c)
            sofar_b
            (c + 1))
        sofar_a
        (b + 1))
    0
    (a + 1)

let _ =
  let a = read_int () in
  let b = read_int () in
  let c = read_int () in
  let x = read_int () in
  solve a b c x |> string_of_int |> print_endline