program coins
  implicit none
  integer :: a, b, c, x, i, j, k, m = 0
  read(*,*) a
  read(*,*) b
  read(*,*) c
  read(*,*) x
  x = x/50
  do i = 0, a
    if (10*i > x) exit
    do j = 0, b
      if (10*i+2*j > x) exit
      k = x-(10*i+2*j)
      if (k <= c) m = m+1
    end do
  end do
  write(*,'(i0)') m
end program coins