import java.util.*;
public class Main {
	public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);
      //500円玉の枚数
      int a = sc.nextInt();
      //100円だまの枚数
      int b = sc.nextInt();
      //50円玉の枚数
      int c = sc.nextInt();
      //合計金額
      int x = sc.nextInt();
      //カウンター
      int counter = 0;
      for(int i = 0; i <= a; i++){
        for(int j = 0; j <= b; j++){
          for(int k = 0; k <= c ;k++){
            int total = 500 * i + 100 * j + 50 * k;
            if(total == x){
            	counter++;
            }
          }
        }
      }
      System.out.print(counter);
    }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);
      //500円玉の枚数
      int a = sc.nextInt();
      //100円だまの枚数
      int b = sc.nextInt();
      //50円玉の枚数
      int c = sc.nextInt();
      //合計金額
      int x = sc.nextInt();
      //カウンター
      int counter = 0;
      for(int i = 0; i <= a; i++){
        for(int j = 0; j <= b; j++){
          for(int k = 0; k <= c ;k++){
            int total = 500 * i + 100 * j + 50 * k;
            if(total == x){
            	counter++;
            }
          }
        }
      }
      System.out.print(counter);
    }
} Main public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);
      //500円玉の枚数
      int a = sc.nextInt();
      //100円だまの枚数
      int b = sc.nextInt();
      //50円玉の枚数
      int c = sc.nextInt();
      //合計金額
      int x = sc.nextInt();
      //カウンター
      int counter = 0;
      for(int i = 0; i <= a; i++){
        for(int j = 0; j <= b; j++){
          for(int k = 0; k <= c ;k++){
            int total = 500 * i + 100 * j + 50 * k;
            if(total == x){
            	counter++;
            }
          }
        }
      }
      System.out.print(counter);
    } main {
	  Scanner sc = new Scanner(System.in);
      //500円玉の枚数
      int a = sc.nextInt();
      //100円だまの枚数
      int b = sc.nextInt();
      //50円玉の枚数
      int c = sc.nextInt();
      //合計金額
      int x = sc.nextInt();
      //カウンター
      int counter = 0;
      for(int i = 0; i <= a; i++){
        for(int j = 0; j <= b; j++){
          for(int k = 0; k <= c ;k++){
            int total = 500 * i + 100 * j + 50 * k;
            if(total == x){
            	counter++;
            }
          }
        }
      }
      System.out.print(counter);
    } 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 x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int counter = 0; counter 0 for(int i = 0; i <= a; i++){
        for(int j = 0; j <= b; j++){
          for(int k = 0; k <= c ;k++){
            int total = 500 * i + 100 * j + 50 * k;
            if(total == x){
            	counter++;
            }
          }
        }
      } int i = 0; int i = 0; i 0 i <= a i a i++ i++ i {
        for(int j = 0; j <= b; j++){
          for(int k = 0; k <= c ;k++){
            int total = 500 * i + 100 * j + 50 * k;
            if(total == x){
            	counter++;
            }
          }
        }
      } {
        for(int j = 0; j <= b; j++){
          for(int k = 0; k <= c ;k++){
            int total = 500 * i + 100 * j + 50 * k;
            if(total == x){
            	counter++;
            }
          }
        }
      } for(int j = 0; j <= b; j++){
          for(int k = 0; k <= c ;k++){
            int total = 500 * i + 100 * j + 50 * k;
            if(total == x){
            	counter++;
            }
          }
        } int j = 0; int j = 0; j 0 j <= b j b j++ j++ j {
          for(int k = 0; k <= c ;k++){
            int total = 500 * i + 100 * j + 50 * k;
            if(total == x){
            	counter++;
            }
          }
        } {
          for(int k = 0; k <= c ;k++){
            int total = 500 * i + 100 * j + 50 * k;
            if(total == x){
            	counter++;
            }
          }
        } for(int k = 0; k <= c ;k++){
            int total = 500 * i + 100 * j + 50 * k;
            if(total == x){
            	counter++;
            }
          } int k = 0; int k = 0; k 0 k <= c k c k++ k++ k {
            int total = 500 * i + 100 * j + 50 * k;
            if(total == x){
            	counter++;
            }
          } {
            int total = 500 * i + 100 * j + 50 * k;
            if(total == x){
            	counter++;
            }
          } int total = 500 * i + 100 * j + 50 * k; total 500 * i + 100 * j + 50 * k 500 * i + 100 * j + 50 * k 500 * i 500 i 100 * j 100 j 50 * k 50 k if(total == x){
            	counter++;
            } total == x total x {
            	counter++;
            } counter++ counter System.out.print(counter) System.out.print System.out System System.out counter String[] args args public class Main {
	public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);
      //500円玉の枚数
      int a = sc.nextInt();
      //100円だまの枚数
      int b = sc.nextInt();
      //50円玉の枚数
      int c = sc.nextInt();
      //合計金額
      int x = sc.nextInt();
      //カウンター
      int counter = 0;
      for(int i = 0; i <= a; i++){
        for(int j = 0; j <= b; j++){
          for(int k = 0; k <= c ;k++){
            int total = 500 * i + 100 * j + 50 * k;
            if(total == x){
            	counter++;
            }
          }
        }
      }
      System.out.print(counter);
    }
} public class Main {
	public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);
      //500円玉の枚数
      int a = sc.nextInt();
      //100円だまの枚数
      int b = sc.nextInt();
      //50円玉の枚数
      int c = sc.nextInt();
      //合計金額
      int x = sc.nextInt();
      //カウンター
      int counter = 0;
      for(int i = 0; i <= a; i++){
        for(int j = 0; j <= b; j++){
          for(int k = 0; k <= c ;k++){
            int total = 500 * i + 100 * j + 50 * k;
            if(total == x){
            	counter++;
            }
          }
        }
      }
      System.out.print(counter);
    }
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);
      //500円玉の枚数
      int a = sc.nextInt();
      //100円だまの枚数
      int b = sc.nextInt();
      //50円玉の枚数
      int c = sc.nextInt();
      //合計金額
      int x = sc.nextInt();
      //カウンター
      int counter = 0;
      for(int i = 0; i <= a; i++){
        for(int j = 0; j <= b; j++){
          for(int k = 0; k <= c ;k++){
            int total = 500 * i + 100 * j + 50 * k;
            if(total == x){
            	counter++;
            }
          }
        }
      }
      System.out.print(counter);
    }
}
