program atcoder
    implicit none
    integer :: A, B, C, X, i, j, k, counter

    read *, A, B, C, X
    counter = 0
    do i = 0, A
        do j = 0, B
            do k = 0, C
                if(X == 500*i + 100*j + 50*k) then
                    counter = counter + 1
                end if
            end do
        end do
    end do
    print '(i0)', counter
    stop

end program atcoder
