let a = read_int()
let b = read_int()
let c = read_int()
let x = read_int()

let rec count i j k n =
  if i > a then n
  else if j > b then (count (i+1) 0 0 n)
  else if k > c then (count i (j+1) 0 n)
  else if 500*i + 100*j + 50*k = x then (count i j (k+1) n+1)
  else (count i j (k+1) n)

let answer = string_of_int (count 0 0 0 0)

let () = print_endline answer