
import java.util.*;
class Main{
 public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
      int a = sc.nextInt();
      int b = sc.nextInt();
      int c = sc.nextInt();
      int d = sc.nextInt();
      int t = 0;
   for(int i = 0;i <= a;i++){
    for(int q = 0;q <= b;q++){
      for(int h = 0; h <= c; h++){
        if(d == i * 500 + q * 100 + h * 50){
        t++;
        }
      }  
     }
    }
   System.out.println(t);
 } 
} import java.util.*; util.* java class Main{
 public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
      int a = sc.nextInt();
      int b = sc.nextInt();
      int c = sc.nextInt();
      int d = sc.nextInt();
      int t = 0;
   for(int i = 0;i <= a;i++){
    for(int q = 0;q <= b;q++){
      for(int h = 0; h <= c; h++){
        if(d == i * 500 + q * 100 + h * 50){
        t++;
        }
      }  
     }
    }
   System.out.println(t);
 } 
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
      int a = sc.nextInt();
      int b = sc.nextInt();
      int c = sc.nextInt();
      int d = sc.nextInt();
      int t = 0;
   for(int i = 0;i <= a;i++){
    for(int q = 0;q <= b;q++){
      for(int h = 0; h <= c; h++){
        if(d == i * 500 + q * 100 + h * 50){
        t++;
        }
      }  
     }
    }
   System.out.println(t);
 } main {
    Scanner sc = new Scanner(System.in);
      int a = sc.nextInt();
      int b = sc.nextInt();
      int c = sc.nextInt();
      int d = sc.nextInt();
      int t = 0;
   for(int i = 0;i <= a;i++){
    for(int q = 0;q <= b;q++){
      for(int h = 0; h <= c; h++){
        if(d == i * 500 + q * 100 + h * 50){
        t++;
        }
      }  
     }
    }
   System.out.println(t);
 } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int d = sc.nextInt(); d sc.nextInt() sc.nextInt sc int t = 0; t 0 for(int i = 0;i <= a;i++){
    for(int q = 0;q <= b;q++){
      for(int h = 0; h <= c; h++){
        if(d == i * 500 + q * 100 + h * 50){
        t++;
        }
      }  
     }
    } int i = 0; int i = 0; i 0 i <= a i a i++ i++ i {
    for(int q = 0;q <= b;q++){
      for(int h = 0; h <= c; h++){
        if(d == i * 500 + q * 100 + h * 50){
        t++;
        }
      }  
     }
    } {
    for(int q = 0;q <= b;q++){
      for(int h = 0; h <= c; h++){
        if(d == i * 500 + q * 100 + h * 50){
        t++;
        }
      }  
     }
    } for(int q = 0;q <= b;q++){
      for(int h = 0; h <= c; h++){
        if(d == i * 500 + q * 100 + h * 50){
        t++;
        }
      }  
     } int q = 0; int q = 0; q 0 q <= b q b q++ q++ q {
      for(int h = 0; h <= c; h++){
        if(d == i * 500 + q * 100 + h * 50){
        t++;
        }
      }  
     } {
      for(int h = 0; h <= c; h++){
        if(d == i * 500 + q * 100 + h * 50){
        t++;
        }
      }  
     } for(int h = 0; h <= c; h++){
        if(d == i * 500 + q * 100 + h * 50){
        t++;
        }
      } int h = 0; int h = 0; h 0 h <= c h c h++ h++ h {
        if(d == i * 500 + q * 100 + h * 50){
        t++;
        }
      } {
        if(d == i * 500 + q * 100 + h * 50){
        t++;
        }
      } if(d == i * 500 + q * 100 + h * 50){
        t++;
        } d == i * 500 + q * 100 + h * 50 d i * 500 + q * 100 + h * 50 i * 500 + q * 100 + h * 50 i * 500 i 500 q * 100 q 100 h * 50 h 50 {
        t++;
        } t++ t System.out.println(t) System.out.println System.out System System.out t String[] args args

import java.util.*;
class Main{
 public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
      int a = sc.nextInt();
      int b = sc.nextInt();
      int c = sc.nextInt();
      int d = sc.nextInt();
      int t = 0;
   for(int i = 0;i <= a;i++){
    for(int q = 0;q <= b;q++){
      for(int h = 0; h <= c; h++){
        if(d == i * 500 + q * 100 + h * 50){
        t++;
        }
      }  
     }
    }
   System.out.println(t);
 } 
}