import java.util.*;
  public class Main{
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int a = Integer.parseInt(sc.next());
      int b = Integer.parseInt(sc.next());
      int c = Integer.parseInt(sc.next());
      int x = Integer.parseInt(sc.next());
      int count = 0;
      for(int d = 0; d <= a; d++){
        for(int e = 0; e <=b; e++){
          for(int f = 0; f <= c; f++){
            int total = 500*d+100*e+50*f;
            if (total == x){
              count++;
            }
          }
        }
      }
      System.out.println(count);
    }
  } import java.util.*; util.* java public class Main{
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int a = Integer.parseInt(sc.next());
      int b = Integer.parseInt(sc.next());
      int c = Integer.parseInt(sc.next());
      int x = Integer.parseInt(sc.next());
      int count = 0;
      for(int d = 0; d <= a; d++){
        for(int e = 0; e <=b; e++){
          for(int f = 0; f <= c; f++){
            int total = 500*d+100*e+50*f;
            if (total == x){
              count++;
            }
          }
        }
      }
      System.out.println(count);
    }
  } Main public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int a = Integer.parseInt(sc.next());
      int b = Integer.parseInt(sc.next());
      int c = Integer.parseInt(sc.next());
      int x = Integer.parseInt(sc.next());
      int count = 0;
      for(int d = 0; d <= a; d++){
        for(int e = 0; e <=b; e++){
          for(int f = 0; f <= c; f++){
            int total = 500*d+100*e+50*f;
            if (total == x){
              count++;
            }
          }
        }
      }
      System.out.println(count);
    } main {
      Scanner sc = new Scanner(System.in);
      int a = Integer.parseInt(sc.next());
      int b = Integer.parseInt(sc.next());
      int c = Integer.parseInt(sc.next());
      int x = Integer.parseInt(sc.next());
      int count = 0;
      for(int d = 0; d <= a; d++){
        for(int e = 0; e <=b; e++){
          for(int f = 0; f <= c; f++){
            int total = 500*d+100*e+50*f;
            if (total == x){
              count++;
            }
          }
        }
      }
      System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int c = Integer.parseInt(sc.next()); c Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int x = Integer.parseInt(sc.next()); x Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int count = 0; count 0 for(int d = 0; d <= a; d++){
        for(int e = 0; e <=b; e++){
          for(int f = 0; f <= c; f++){
            int total = 500*d+100*e+50*f;
            if (total == x){
              count++;
            }
          }
        }
      } int d = 0; int d = 0; d 0 d <= a d a d++ d++ d {
        for(int e = 0; e <=b; e++){
          for(int f = 0; f <= c; f++){
            int total = 500*d+100*e+50*f;
            if (total == x){
              count++;
            }
          }
        }
      } {
        for(int e = 0; e <=b; e++){
          for(int f = 0; f <= c; f++){
            int total = 500*d+100*e+50*f;
            if (total == x){
              count++;
            }
          }
        }
      } for(int e = 0; e <=b; e++){
          for(int f = 0; f <= c; f++){
            int total = 500*d+100*e+50*f;
            if (total == x){
              count++;
            }
          }
        } int e = 0; int e = 0; e 0 e <=b e b e++ e++ e {
          for(int f = 0; f <= c; f++){
            int total = 500*d+100*e+50*f;
            if (total == x){
              count++;
            }
          }
        } {
          for(int f = 0; f <= c; f++){
            int total = 500*d+100*e+50*f;
            if (total == x){
              count++;
            }
          }
        } for(int f = 0; f <= c; f++){
            int total = 500*d+100*e+50*f;
            if (total == x){
              count++;
            }
          } int f = 0; int f = 0; f 0 f <= c f c f++ f++ f {
            int total = 500*d+100*e+50*f;
            if (total == x){
              count++;
            }
          } {
            int total = 500*d+100*e+50*f;
            if (total == x){
              count++;
            }
          } int total = 500*d+100*e+50*f; total 500*d+100*e+50*f 500*d+100*e+50*f 500*d 500 d 100*e 100 e 50*f 50 f if (total == x){
              count++;
            } total == x total x {
              count++;
            } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main{
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int a = Integer.parseInt(sc.next());
      int b = Integer.parseInt(sc.next());
      int c = Integer.parseInt(sc.next());
      int x = Integer.parseInt(sc.next());
      int count = 0;
      for(int d = 0; d <= a; d++){
        for(int e = 0; e <=b; e++){
          for(int f = 0; f <= c; f++){
            int total = 500*d+100*e+50*f;
            if (total == x){
              count++;
            }
          }
        }
      }
      System.out.println(count);
    }
  } public class Main{
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int a = Integer.parseInt(sc.next());
      int b = Integer.parseInt(sc.next());
      int c = Integer.parseInt(sc.next());
      int x = Integer.parseInt(sc.next());
      int count = 0;
      for(int d = 0; d <= a; d++){
        for(int e = 0; e <=b; e++){
          for(int f = 0; f <= c; f++){
            int total = 500*d+100*e+50*f;
            if (total == x){
              count++;
            }
          }
        }
      }
      System.out.println(count);
    }
  } Main
import java.util.*;
  public class Main{
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int a = Integer.parseInt(sc.next());
      int b = Integer.parseInt(sc.next());
      int c = Integer.parseInt(sc.next());
      int x = Integer.parseInt(sc.next());
      int count = 0;
      for(int d = 0; d <= a; d++){
        for(int e = 0; e <=b; e++){
          for(int f = 0; f <= c; f++){
            int total = 500*d+100*e+50*f;
            if (total == x){
              count++;
            }
          }
        }
      }
      System.out.println(count);
    }
  }