Module Module1
    Sub Main()
        Dim x, a, b, c, a0, b0, c0, cnt
    
        a0 = Int(Console.ReadLine)
        b0 = Int(Console.ReadLine)
        c0 = Int(Console.ReadLine)
        x = Int(Console.ReadLine)
        
        cnt = 0
        For a = 0 To a0             '500円玉
            For b = 0 To b0         '100円玉
                For c = 0 To c0     ' 50円玉
                    If 500 * a + 100 * b + 50 * c = x Then
                        cnt = cnt + 1
                    End If
                Next c
            Next b
        Next a

        Console.WriteLine (cnt)

    End Sub
End Module