      PROGRAM bb
      IMPLICIT NONE
      INTEGER :: a,b,c,x
      INTEGER :: alpha,beta,gamma,S,ans,piyo
      !C50 B100 A500
      
      read*,a
      read*,b
      read*,c
      read*,x
      
      piyo = x
      ans = 0
      
      
      DO alpha = 0,a
        DO beta = 0,b
          DO gamma = 0,c
            
            S = alpha*500 + beta*100 + gamma*50
            IF( S==piyo )THEN
              ans = ans + 1
            END IF
          END DO
        END DO
      END DO
      
      
      
      print'(I0)',ans
      
      
      
      
      
      
      
      
      
      
      END PROGRAM