import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = Integer.parseInt(sc.nextLine());
    int b = Integer.parseInt(sc.nextLine());
    int c = Integer.parseInt(sc.nextLine());
    int x = Integer.parseInt(sc.nextLine());

    int cnt = 0;
    for (int i = 0; i <= a; i++) {
      for (int ii = 0; ii <= b; ii++) {
        for (int iii = 0; iii <= c; iii++) {
          if (500 * i + 100 * ii + 50 * iii == x) cnt += 1;
        }
      }
    }
    System.out.println(cnt);
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = Integer.parseInt(sc.nextLine());
    int b = Integer.parseInt(sc.nextLine());
    int c = Integer.parseInt(sc.nextLine());
    int x = Integer.parseInt(sc.nextLine());

    int cnt = 0;
    for (int i = 0; i <= a; i++) {
      for (int ii = 0; ii <= b; ii++) {
        for (int iii = 0; iii <= c; iii++) {
          if (500 * i + 100 * ii + 50 * iii == x) cnt += 1;
        }
      }
    }
    System.out.println(cnt);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = Integer.parseInt(sc.nextLine());
    int b = Integer.parseInt(sc.nextLine());
    int c = Integer.parseInt(sc.nextLine());
    int x = Integer.parseInt(sc.nextLine());

    int cnt = 0;
    for (int i = 0; i <= a; i++) {
      for (int ii = 0; ii <= b; ii++) {
        for (int iii = 0; iii <= c; iii++) {
          if (500 * i + 100 * ii + 50 * iii == x) cnt += 1;
        }
      }
    }
    System.out.println(cnt);
  } main {
    Scanner sc = new Scanner(System.in);
    int a = Integer.parseInt(sc.nextLine());
    int b = Integer.parseInt(sc.nextLine());
    int c = Integer.parseInt(sc.nextLine());
    int x = Integer.parseInt(sc.nextLine());

    int cnt = 0;
    for (int i = 0; i <= a; i++) {
      for (int ii = 0; ii <= b; ii++) {
        for (int iii = 0; iii <= c; iii++) {
          if (500 * i + 100 * ii + 50 * iii == x) cnt += 1;
        }
      }
    }
    System.out.println(cnt);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.nextLine()); a Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int b = Integer.parseInt(sc.nextLine()); b Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int c = Integer.parseInt(sc.nextLine()); c Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int x = Integer.parseInt(sc.nextLine()); x Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int cnt = 0; cnt 0 for (int i = 0; i <= a; i++) {
      for (int ii = 0; ii <= b; ii++) {
        for (int iii = 0; iii <= c; iii++) {
          if (500 * i + 100 * ii + 50 * iii == x) cnt += 1;
        }
      }
    } int i = 0; int i = 0; i 0 i <= a i a i++ i++ i {
      for (int ii = 0; ii <= b; ii++) {
        for (int iii = 0; iii <= c; iii++) {
          if (500 * i + 100 * ii + 50 * iii == x) cnt += 1;
        }
      }
    } {
      for (int ii = 0; ii <= b; ii++) {
        for (int iii = 0; iii <= c; iii++) {
          if (500 * i + 100 * ii + 50 * iii == x) cnt += 1;
        }
      }
    } for (int ii = 0; ii <= b; ii++) {
        for (int iii = 0; iii <= c; iii++) {
          if (500 * i + 100 * ii + 50 * iii == x) cnt += 1;
        }
      } int ii = 0; int ii = 0; ii 0 ii <= b ii b ii++ ii++ ii {
        for (int iii = 0; iii <= c; iii++) {
          if (500 * i + 100 * ii + 50 * iii == x) cnt += 1;
        }
      } {
        for (int iii = 0; iii <= c; iii++) {
          if (500 * i + 100 * ii + 50 * iii == x) cnt += 1;
        }
      } for (int iii = 0; iii <= c; iii++) {
          if (500 * i + 100 * ii + 50 * iii == x) cnt += 1;
        } int iii = 0; int iii = 0; iii 0 iii <= c iii c iii++ iii++ iii {
          if (500 * i + 100 * ii + 50 * iii == x) cnt += 1;
        } {
          if (500 * i + 100 * ii + 50 * iii == x) cnt += 1;
        } if (500 * i + 100 * ii + 50 * iii == x) cnt += 1; 500 * i + 100 * ii + 50 * iii == x 500 * i + 100 * ii + 50 * iii 500 * i + 100 * ii + 50 * iii 500 * i 500 i 100 * ii 100 ii 50 * iii 50 iii x cnt += 1 cnt 1 System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = Integer.parseInt(sc.nextLine());
    int b = Integer.parseInt(sc.nextLine());
    int c = Integer.parseInt(sc.nextLine());
    int x = Integer.parseInt(sc.nextLine());

    int cnt = 0;
    for (int i = 0; i <= a; i++) {
      for (int ii = 0; ii <= b; ii++) {
        for (int iii = 0; iii <= c; iii++) {
          if (500 * i + 100 * ii + 50 * iii == x) cnt += 1;
        }
      }
    }
    System.out.println(cnt);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = Integer.parseInt(sc.nextLine());
    int b = Integer.parseInt(sc.nextLine());
    int c = Integer.parseInt(sc.nextLine());
    int x = Integer.parseInt(sc.nextLine());

    int cnt = 0;
    for (int i = 0; i <= a; i++) {
      for (int ii = 0; ii <= b; ii++) {
        for (int iii = 0; iii <= c; iii++) {
          if (500 * i + 100 * ii + 50 * iii == x) cnt += 1;
        }
      }
    }
    System.out.println(cnt);
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = Integer.parseInt(sc.nextLine());
    int b = Integer.parseInt(sc.nextLine());
    int c = Integer.parseInt(sc.nextLine());
    int x = Integer.parseInt(sc.nextLine());

    int cnt = 0;
    for (int i = 0; i <= a; i++) {
      for (int ii = 0; ii <= b; ii++) {
        for (int iii = 0; iii <= c; iii++) {
          if (500 * i + 100 * ii + 50 * iii == x) cnt += 1;
        }
      }
    }
    System.out.println(cnt);
  }
}
