Imports System

Public Class Program

    Public Shared Sub Main()

        '10円玉
        Dim A As Integer = Integer.Parse(Console.ReadLine)
        '2円玉
        Dim B As Integer = Integer.Parse(Console.ReadLine)
        '1円玉
        Dim C As Integer = Integer.Parse(Console.ReadLine)
        '目標
        Dim X As Integer = Integer.Parse(Console.ReadLine) / 50

        Dim cnt As Integer = 0

        For ia As Integer = 0 To A
            For ib As Integer = 0 To B
                For ic As Integer = 0 To C

                    If ia * 10 + ib * 2 + ic = X Then
                        cnt += 1
                    End If

                Next
            Next
        Next

        Console.WriteLine(cnt)

    End Sub
End Class
