program main
  implicit none
  
  integer :: i,j,k,a,b,c,x,cou=0
  
  read(*,*)a
  read(*,*)b
  read(*,*)c
  read(*,*)x
  
  do i = 0, a
    do j = 0, b
      do k = 0, c
        if ((500*i+100*j+50*k) == x) then
          cou = cou + 1
        end if
      end do
    end do
  end do
  
  write(*,*)cou
end program main
          