  implicit none

  integer::a,b,c,x
  integer::count
  integer::i,j,k
  
  read(*,*)a
  read(*,*)b
  read(*,*)c
  read(*,*)x

  count=0
  do i=0,a
     do j=0,b
        do k=0,c
           if(x==i*500+j*100+k*50)count=count+1
        end do
     end do
  end do

  write(*,*)count