import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int fiveHundred = sc.nextInt();
    int oneHundred = sc.nextInt();
    int fifty = sc.nextInt();
    int totalYen = sc.nextInt();
    int[] coins = new int[51];
    int count = 0;
    for (int i = 0; i <= 50; i++) {
      coins[i] = i;
    }
    for (int j = 0; j <= fiveHundred; j++) {
      for (int k = 0; k <= oneHundred; k++) {
        for (int l = 0; l <= fifty; l++) {
          if (500 * j + 100 * k + 50 * l == totalYen) {
            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 fiveHundred = sc.nextInt();
    int oneHundred = sc.nextInt();
    int fifty = sc.nextInt();
    int totalYen = sc.nextInt();
    int[] coins = new int[51];
    int count = 0;
    for (int i = 0; i <= 50; i++) {
      coins[i] = i;
    }
    for (int j = 0; j <= fiveHundred; j++) {
      for (int k = 0; k <= oneHundred; k++) {
        for (int l = 0; l <= fifty; l++) {
          if (500 * j + 100 * k + 50 * l == totalYen) {
            count++;
          }
        }
      } 
    }
    System.out.println(count);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int fiveHundred = sc.nextInt();
    int oneHundred = sc.nextInt();
    int fifty = sc.nextInt();
    int totalYen = sc.nextInt();
    int[] coins = new int[51];
    int count = 0;
    for (int i = 0; i <= 50; i++) {
      coins[i] = i;
    }
    for (int j = 0; j <= fiveHundred; j++) {
      for (int k = 0; k <= oneHundred; k++) {
        for (int l = 0; l <= fifty; l++) {
          if (500 * j + 100 * k + 50 * l == totalYen) {
            count++;
          }
        }
      } 
    }
    System.out.println(count);
  } main {
    Scanner sc = new Scanner(System.in);
    int fiveHundred = sc.nextInt();
    int oneHundred = sc.nextInt();
    int fifty = sc.nextInt();
    int totalYen = sc.nextInt();
    int[] coins = new int[51];
    int count = 0;
    for (int i = 0; i <= 50; i++) {
      coins[i] = i;
    }
    for (int j = 0; j <= fiveHundred; j++) {
      for (int k = 0; k <= oneHundred; k++) {
        for (int l = 0; l <= fifty; l++) {
          if (500 * j + 100 * k + 50 * l == totalYen) {
            count++;
          }
        }
      } 
    }
    System.out.println(count);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int fiveHundred = sc.nextInt(); fiveHundred sc.nextInt() sc.nextInt sc int oneHundred = sc.nextInt(); oneHundred sc.nextInt() sc.nextInt sc int fifty = sc.nextInt(); fifty sc.nextInt() sc.nextInt sc int totalYen = sc.nextInt(); totalYen sc.nextInt() sc.nextInt sc int[] coins = new int[51]; coins new int[51] 51 int count = 0; count 0 for (int i = 0; i <= 50; i++) {
      coins[i] = i;
    } int i = 0; int i = 0; i 0 i <= 50 i 50 i++ i++ i {
      coins[i] = i;
    } {
      coins[i] = i;
    } coins[i] = i coins[i] coins i i for (int j = 0; j <= fiveHundred; j++) {
      for (int k = 0; k <= oneHundred; k++) {
        for (int l = 0; l <= fifty; l++) {
          if (500 * j + 100 * k + 50 * l == totalYen) {
            count++;
          }
        }
      } 
    } int j = 0; int j = 0; j 0 j <= fiveHundred j fiveHundred j++ j++ j {
      for (int k = 0; k <= oneHundred; k++) {
        for (int l = 0; l <= fifty; l++) {
          if (500 * j + 100 * k + 50 * l == totalYen) {
            count++;
          }
        }
      } 
    } {
      for (int k = 0; k <= oneHundred; k++) {
        for (int l = 0; l <= fifty; l++) {
          if (500 * j + 100 * k + 50 * l == totalYen) {
            count++;
          }
        }
      } 
    } for (int k = 0; k <= oneHundred; k++) {
        for (int l = 0; l <= fifty; l++) {
          if (500 * j + 100 * k + 50 * l == totalYen) {
            count++;
          }
        }
      } int k = 0; int k = 0; k 0 k <= oneHundred k oneHundred k++ k++ k {
        for (int l = 0; l <= fifty; l++) {
          if (500 * j + 100 * k + 50 * l == totalYen) {
            count++;
          }
        }
      } {
        for (int l = 0; l <= fifty; l++) {
          if (500 * j + 100 * k + 50 * l == totalYen) {
            count++;
          }
        }
      } for (int l = 0; l <= fifty; l++) {
          if (500 * j + 100 * k + 50 * l == totalYen) {
            count++;
          }
        } int l = 0; int l = 0; l 0 l <= fifty l fifty l++ l++ l {
          if (500 * j + 100 * k + 50 * l == totalYen) {
            count++;
          }
        } {
          if (500 * j + 100 * k + 50 * l == totalYen) {
            count++;
          }
        } if (500 * j + 100 * k + 50 * l == totalYen) {
            count++;
          } 500 * j + 100 * k + 50 * l == totalYen 500 * j + 100 * k + 50 * l 500 * j + 100 * k + 50 * l 500 * j 500 j 100 * k 100 k 50 * l 50 l totalYen {
            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 fiveHundred = sc.nextInt();
    int oneHundred = sc.nextInt();
    int fifty = sc.nextInt();
    int totalYen = sc.nextInt();
    int[] coins = new int[51];
    int count = 0;
    for (int i = 0; i <= 50; i++) {
      coins[i] = i;
    }
    for (int j = 0; j <= fiveHundred; j++) {
      for (int k = 0; k <= oneHundred; k++) {
        for (int l = 0; l <= fifty; l++) {
          if (500 * j + 100 * k + 50 * l == totalYen) {
            count++;
          }
        }
      } 
    }
    System.out.println(count);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int fiveHundred = sc.nextInt();
    int oneHundred = sc.nextInt();
    int fifty = sc.nextInt();
    int totalYen = sc.nextInt();
    int[] coins = new int[51];
    int count = 0;
    for (int i = 0; i <= 50; i++) {
      coins[i] = i;
    }
    for (int j = 0; j <= fiveHundred; j++) {
      for (int k = 0; k <= oneHundred; k++) {
        for (int l = 0; l <= fifty; l++) {
          if (500 * j + 100 * k + 50 * l == totalYen) {
            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 fiveHundred = sc.nextInt();
    int oneHundred = sc.nextInt();
    int fifty = sc.nextInt();
    int totalYen = sc.nextInt();
    int[] coins = new int[51];
    int count = 0;
    for (int i = 0; i <= 50; i++) {
      coins[i] = i;
    }
    for (int j = 0; j <= fiveHundred; j++) {
      for (int k = 0; k <= oneHundred; k++) {
        for (int l = 0; l <= fifty; l++) {
          if (500 * j + 100 * k + 50 * l == totalYen) {
            count++;
          }
        }
      } 
    }
    System.out.println(count);
  }
}