import java.util.*;

public 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 x = sc.nextInt();

    int am = Math.min (x / 500, a);
    int bm = Math.min (x / 100, b);
    
    int cnt = 0;
    for (int i = am; i >= 0; i--) {
      int n = x;
      if (n == 500 * i) cnt++;
      for (int j = bm; j >= 0; j--) {
        n = x - (500 * i);
        if (n > 0 && n == 100 * j) cnt++;
        n = x - (500 * i) - (100 * j);
        if (n > 0 && n <= 50 * c) cnt++;
      }
    }

    System.out.println(cnt);
  }
} import java.util.*; util.* java public 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 x = sc.nextInt();

    int am = Math.min (x / 500, a);
    int bm = Math.min (x / 100, b);
    
    int cnt = 0;
    for (int i = am; i >= 0; i--) {
      int n = x;
      if (n == 500 * i) cnt++;
      for (int j = bm; j >= 0; j--) {
        n = x - (500 * i);
        if (n > 0 && n == 100 * j) cnt++;
        n = x - (500 * i) - (100 * j);
        if (n > 0 && n <= 50 * c) cnt++;
      }
    }

    System.out.println(cnt);
  }
} 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 x = sc.nextInt();

    int am = Math.min (x / 500, a);
    int bm = Math.min (x / 100, b);
    
    int cnt = 0;
    for (int i = am; i >= 0; i--) {
      int n = x;
      if (n == 500 * i) cnt++;
      for (int j = bm; j >= 0; j--) {
        n = x - (500 * i);
        if (n > 0 && n == 100 * j) cnt++;
        n = x - (500 * i) - (100 * j);
        if (n > 0 && n <= 50 * c) cnt++;
      }
    }

    System.out.println(cnt);
  } main {
    Scanner sc = new Scanner(System.in);

    int a = sc.nextInt();
    int b = sc.nextInt();
    int c = sc.nextInt();
    int x = sc.nextInt();

    int am = Math.min (x / 500, a);
    int bm = Math.min (x / 100, b);
    
    int cnt = 0;
    for (int i = am; i >= 0; i--) {
      int n = x;
      if (n == 500 * i) cnt++;
      for (int j = bm; j >= 0; j--) {
        n = x - (500 * i);
        if (n > 0 && n == 100 * j) cnt++;
        n = x - (500 * i) - (100 * j);
        if (n > 0 && n <= 50 * c) cnt++;
      }
    }

    System.out.println(cnt);
  } 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 am = Math.min (x / 500, a); am Math.min (x / 500, a) Math.min Math x / 500 x 500 a int bm = Math.min (x / 100, b); bm Math.min (x / 100, b) Math.min Math x / 100 x 100 b int cnt = 0; cnt 0 for (int i = am; i >= 0; i--) {
      int n = x;
      if (n == 500 * i) cnt++;
      for (int j = bm; j >= 0; j--) {
        n = x - (500 * i);
        if (n > 0 && n == 100 * j) cnt++;
        n = x - (500 * i) - (100 * j);
        if (n > 0 && n <= 50 * c) cnt++;
      }
    } int i = am; int i = am; i am i >= 0 i 0 i-- i-- i {
      int n = x;
      if (n == 500 * i) cnt++;
      for (int j = bm; j >= 0; j--) {
        n = x - (500 * i);
        if (n > 0 && n == 100 * j) cnt++;
        n = x - (500 * i) - (100 * j);
        if (n > 0 && n <= 50 * c) cnt++;
      }
    } {
      int n = x;
      if (n == 500 * i) cnt++;
      for (int j = bm; j >= 0; j--) {
        n = x - (500 * i);
        if (n > 0 && n == 100 * j) cnt++;
        n = x - (500 * i) - (100 * j);
        if (n > 0 && n <= 50 * c) cnt++;
      }
    } int n = x; n x if (n == 500 * i) cnt++; n == 500 * i n 500 * i 500 i cnt++ cnt for (int j = bm; j >= 0; j--) {
        n = x - (500 * i);
        if (n > 0 && n == 100 * j) cnt++;
        n = x - (500 * i) - (100 * j);
        if (n > 0 && n <= 50 * c) cnt++;
      } int j = bm; int j = bm; j bm j >= 0 j 0 j-- j-- j {
        n = x - (500 * i);
        if (n > 0 && n == 100 * j) cnt++;
        n = x - (500 * i) - (100 * j);
        if (n > 0 && n <= 50 * c) cnt++;
      } {
        n = x - (500 * i);
        if (n > 0 && n == 100 * j) cnt++;
        n = x - (500 * i) - (100 * j);
        if (n > 0 && n <= 50 * c) cnt++;
      } n = x - (500 * i) n x - (500 * i) x (500 * i) 500 i if (n > 0 && n == 100 * j) cnt++; n > 0 && n == 100 * j n > 0 n 0 n == 100 * j n 100 * j 100 j cnt++ cnt n = x - (500 * i) - (100 * j) n x - (500 * i) - (100 * j) x - (500 * i) - (100 * j) x (500 * i) 500 i (100 * j) 100 j if (n > 0 && n <= 50 * c) cnt++; n > 0 && n <= 50 * c n > 0 n 0 n <= 50 * c n 50 * c 50 c cnt++ cnt 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 = sc.nextInt();
    int b = sc.nextInt();
    int c = sc.nextInt();
    int x = sc.nextInt();

    int am = Math.min (x / 500, a);
    int bm = Math.min (x / 100, b);
    
    int cnt = 0;
    for (int i = am; i >= 0; i--) {
      int n = x;
      if (n == 500 * i) cnt++;
      for (int j = bm; j >= 0; j--) {
        n = x - (500 * i);
        if (n > 0 && n == 100 * j) cnt++;
        n = x - (500 * i) - (100 * j);
        if (n > 0 && n <= 50 * c) cnt++;
      }
    }

    System.out.println(cnt);
  }
} public 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 x = sc.nextInt();

    int am = Math.min (x / 500, a);
    int bm = Math.min (x / 100, b);
    
    int cnt = 0;
    for (int i = am; i >= 0; i--) {
      int n = x;
      if (n == 500 * i) cnt++;
      for (int j = bm; j >= 0; j--) {
        n = x - (500 * i);
        if (n > 0 && n == 100 * j) cnt++;
        n = x - (500 * i) - (100 * j);
        if (n > 0 && n <= 50 * c) cnt++;
      }
    }

    System.out.println(cnt);
  }
} Main
import java.util.*;

public 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 x = sc.nextInt();

    int am = Math.min (x / 500, a);
    int bm = Math.min (x / 100, b);
    
    int cnt = 0;
    for (int i = am; i >= 0; i--) {
      int n = x;
      if (n == 500 * i) cnt++;
      for (int j = bm; j >= 0; j--) {
        n = x - (500 * i);
        if (n > 0 && n == 100 * j) cnt++;
        n = x - (500 * i) - (100 * j);
        if (n > 0 && n <= 50 * c) cnt++;
      }
    }

    System.out.println(cnt);
  }
}