import java.util.Scanner;
import java.util.ArrayList;

class Main{
  public static void main(String[]arge){
    Scanner scanner = new Scanner(System.in);
    int count_500yen = scanner.nextInt();
    int count_100yen = scanner.nextInt();
    int count_50yen = scanner.nextInt();
    int ammount_price = scanner.nextInt();

    int count = 0;

    for(int i_500 = 0; i_500<=count_500yen;i_500++){
      for(int i_100 = 0; i_100<=count_100yen;i_100++){
        for(int i_50 = 0; i_50<=count_50yen;i_50++){
          int combi = 500*i_500 + 100*i_100 + 50*i_50;
          if(ammount_price == combi) count++;
        }
      }
    }
    System.out.println(count);
  }
} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util class Main{
  public static void main(String[]arge){
    Scanner scanner = new Scanner(System.in);
    int count_500yen = scanner.nextInt();
    int count_100yen = scanner.nextInt();
    int count_50yen = scanner.nextInt();
    int ammount_price = scanner.nextInt();

    int count = 0;

    for(int i_500 = 0; i_500<=count_500yen;i_500++){
      for(int i_100 = 0; i_100<=count_100yen;i_100++){
        for(int i_50 = 0; i_50<=count_50yen;i_50++){
          int combi = 500*i_500 + 100*i_100 + 50*i_50;
          if(ammount_price == combi) count++;
        }
      }
    }
    System.out.println(count);
  }
} Main public static void main(String[]arge){
    Scanner scanner = new Scanner(System.in);
    int count_500yen = scanner.nextInt();
    int count_100yen = scanner.nextInt();
    int count_50yen = scanner.nextInt();
    int ammount_price = scanner.nextInt();

    int count = 0;

    for(int i_500 = 0; i_500<=count_500yen;i_500++){
      for(int i_100 = 0; i_100<=count_100yen;i_100++){
        for(int i_50 = 0; i_50<=count_50yen;i_50++){
          int combi = 500*i_500 + 100*i_100 + 50*i_50;
          if(ammount_price == combi) count++;
        }
      }
    }
    System.out.println(count);
  } main {
    Scanner scanner = new Scanner(System.in);
    int count_500yen = scanner.nextInt();
    int count_100yen = scanner.nextInt();
    int count_50yen = scanner.nextInt();
    int ammount_price = scanner.nextInt();

    int count = 0;

    for(int i_500 = 0; i_500<=count_500yen;i_500++){
      for(int i_100 = 0; i_100<=count_100yen;i_100++){
        for(int i_50 = 0; i_50<=count_50yen;i_50++){
          int combi = 500*i_500 + 100*i_100 + 50*i_50;
          if(ammount_price == combi) count++;
        }
      }
    }
    System.out.println(count);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int count_500yen = scanner.nextInt(); count_500yen scanner.nextInt() scanner.nextInt scanner int count_100yen = scanner.nextInt(); count_100yen scanner.nextInt() scanner.nextInt scanner int count_50yen = scanner.nextInt(); count_50yen scanner.nextInt() scanner.nextInt scanner int ammount_price = scanner.nextInt(); ammount_price scanner.nextInt() scanner.nextInt scanner int count = 0; count 0 for(int i_500 = 0; i_500<=count_500yen;i_500++){
      for(int i_100 = 0; i_100<=count_100yen;i_100++){
        for(int i_50 = 0; i_50<=count_50yen;i_50++){
          int combi = 500*i_500 + 100*i_100 + 50*i_50;
          if(ammount_price == combi) count++;
        }
      }
    } int i_500 = 0; int i_500 = 0; i_500 0 i_500<=count_500yen i_500 count_500yen i_500++ i_500++ i_500 {
      for(int i_100 = 0; i_100<=count_100yen;i_100++){
        for(int i_50 = 0; i_50<=count_50yen;i_50++){
          int combi = 500*i_500 + 100*i_100 + 50*i_50;
          if(ammount_price == combi) count++;
        }
      }
    } {
      for(int i_100 = 0; i_100<=count_100yen;i_100++){
        for(int i_50 = 0; i_50<=count_50yen;i_50++){
          int combi = 500*i_500 + 100*i_100 + 50*i_50;
          if(ammount_price == combi) count++;
        }
      }
    } for(int i_100 = 0; i_100<=count_100yen;i_100++){
        for(int i_50 = 0; i_50<=count_50yen;i_50++){
          int combi = 500*i_500 + 100*i_100 + 50*i_50;
          if(ammount_price == combi) count++;
        }
      } int i_100 = 0; int i_100 = 0; i_100 0 i_100<=count_100yen i_100 count_100yen i_100++ i_100++ i_100 {
        for(int i_50 = 0; i_50<=count_50yen;i_50++){
          int combi = 500*i_500 + 100*i_100 + 50*i_50;
          if(ammount_price == combi) count++;
        }
      } {
        for(int i_50 = 0; i_50<=count_50yen;i_50++){
          int combi = 500*i_500 + 100*i_100 + 50*i_50;
          if(ammount_price == combi) count++;
        }
      } for(int i_50 = 0; i_50<=count_50yen;i_50++){
          int combi = 500*i_500 + 100*i_100 + 50*i_50;
          if(ammount_price == combi) count++;
        } int i_50 = 0; int i_50 = 0; i_50 0 i_50<=count_50yen i_50 count_50yen i_50++ i_50++ i_50 {
          int combi = 500*i_500 + 100*i_100 + 50*i_50;
          if(ammount_price == combi) count++;
        } {
          int combi = 500*i_500 + 100*i_100 + 50*i_50;
          if(ammount_price == combi) count++;
        } int combi = 500*i_500 + 100*i_100 + 50*i_50; combi 500*i_500 + 100*i_100 + 50*i_50 500*i_500 + 100*i_100 + 50*i_50 500*i_500 500 i_500 100*i_100 100 i_100 50*i_50 50 i_50 if(ammount_price == combi) count++; ammount_price == combi ammount_price combi count++ count System.out.println(count) System.out.println System.out System System.out count String[]arge arge
import java.util.Scanner;
import java.util.ArrayList;

class Main{
  public static void main(String[]arge){
    Scanner scanner = new Scanner(System.in);
    int count_500yen = scanner.nextInt();
    int count_100yen = scanner.nextInt();
    int count_50yen = scanner.nextInt();
    int ammount_price = scanner.nextInt();

    int count = 0;

    for(int i_500 = 0; i_500<=count_500yen;i_500++){
      for(int i_100 = 0; i_100<=count_100yen;i_100++){
        for(int i_50 = 0; i_50<=count_50yen;i_50++){
          int combi = 500*i_500 + 100*i_100 + 50*i_50;
          if(ammount_price == combi) count++;
        }
      }
    }
    System.out.println(count);
  }
}