import java.io.*;
import java.util.*;
public class Main {
  public static void main(String[] args) throws Exception {
    String line = null;
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int aa = Integer.parseInt(br.readLine());
    int bb = Integer.parseInt(br.readLine());
    int cc = Integer.parseInt(br.readLine());
    int xx = Integer.parseInt(br.readLine());
    int count = 0;
    for (int i = 0; i <= aa; i ++) {
      if (500 * i > xx) continue;
      for (int j = 0; j <= bb; j ++) {
        if ((500 * i + 100 * j) > xx) continue;
        for (int k = 0; k <= cc; k ++) {
          int val = 500 * i + 100 * j + 50 * k;
          if (val == xx ) count = count + 1;
          //System.out.println(i + "," + j + "," + k + "," + val + "," + count);
        }
      }
    }
    System.out.println(count);
  }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
  public static void main(String[] args) throws Exception {
    String line = null;
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int aa = Integer.parseInt(br.readLine());
    int bb = Integer.parseInt(br.readLine());
    int cc = Integer.parseInt(br.readLine());
    int xx = Integer.parseInt(br.readLine());
    int count = 0;
    for (int i = 0; i <= aa; i ++) {
      if (500 * i > xx) continue;
      for (int j = 0; j <= bb; j ++) {
        if ((500 * i + 100 * j) > xx) continue;
        for (int k = 0; k <= cc; k ++) {
          int val = 500 * i + 100 * j + 50 * k;
          if (val == xx ) count = count + 1;
          //System.out.println(i + "," + j + "," + k + "," + val + "," + count);
        }
      }
    }
    System.out.println(count);
  }
} Main public static void main(String[] args) throws Exception {
    String line = null;
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int aa = Integer.parseInt(br.readLine());
    int bb = Integer.parseInt(br.readLine());
    int cc = Integer.parseInt(br.readLine());
    int xx = Integer.parseInt(br.readLine());
    int count = 0;
    for (int i = 0; i <= aa; i ++) {
      if (500 * i > xx) continue;
      for (int j = 0; j <= bb; j ++) {
        if ((500 * i + 100 * j) > xx) continue;
        for (int k = 0; k <= cc; k ++) {
          int val = 500 * i + 100 * j + 50 * k;
          if (val == xx ) count = count + 1;
          //System.out.println(i + "," + j + "," + k + "," + val + "," + count);
        }
      }
    }
    System.out.println(count);
  } main {
    String line = null;
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int aa = Integer.parseInt(br.readLine());
    int bb = Integer.parseInt(br.readLine());
    int cc = Integer.parseInt(br.readLine());
    int xx = Integer.parseInt(br.readLine());
    int count = 0;
    for (int i = 0; i <= aa; i ++) {
      if (500 * i > xx) continue;
      for (int j = 0; j <= bb; j ++) {
        if ((500 * i + 100 * j) > xx) continue;
        for (int k = 0; k <= cc; k ++) {
          int val = 500 * i + 100 * j + 50 * k;
          if (val == xx ) count = count + 1;
          //System.out.println(i + "," + j + "," + k + "," + val + "," + count);
        }
      }
    }
    System.out.println(count);
  } String line = null; line null BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int aa = Integer.parseInt(br.readLine()); aa Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int bb = Integer.parseInt(br.readLine()); bb Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int cc = Integer.parseInt(br.readLine()); cc Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int xx = Integer.parseInt(br.readLine()); xx Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int count = 0; count 0 for (int i = 0; i <= aa; i ++) {
      if (500 * i > xx) continue;
      for (int j = 0; j <= bb; j ++) {
        if ((500 * i + 100 * j) > xx) continue;
        for (int k = 0; k <= cc; k ++) {
          int val = 500 * i + 100 * j + 50 * k;
          if (val == xx ) count = count + 1;
          //System.out.println(i + "," + j + "," + k + "," + val + "," + count);
        }
      }
    } int i = 0; int i = 0; i 0 i <= aa i aa i ++ i ++ i {
      if (500 * i > xx) continue;
      for (int j = 0; j <= bb; j ++) {
        if ((500 * i + 100 * j) > xx) continue;
        for (int k = 0; k <= cc; k ++) {
          int val = 500 * i + 100 * j + 50 * k;
          if (val == xx ) count = count + 1;
          //System.out.println(i + "," + j + "," + k + "," + val + "," + count);
        }
      }
    } {
      if (500 * i > xx) continue;
      for (int j = 0; j <= bb; j ++) {
        if ((500 * i + 100 * j) > xx) continue;
        for (int k = 0; k <= cc; k ++) {
          int val = 500 * i + 100 * j + 50 * k;
          if (val == xx ) count = count + 1;
          //System.out.println(i + "," + j + "," + k + "," + val + "," + count);
        }
      }
    } if (500 * i > xx) continue; 500 * i > xx 500 * i 500 i xx continue; for (int j = 0; j <= bb; j ++) {
        if ((500 * i + 100 * j) > xx) continue;
        for (int k = 0; k <= cc; k ++) {
          int val = 500 * i + 100 * j + 50 * k;
          if (val == xx ) count = count + 1;
          //System.out.println(i + "," + j + "," + k + "," + val + "," + count);
        }
      } int j = 0; int j = 0; j 0 j <= bb j bb j ++ j ++ j {
        if ((500 * i + 100 * j) > xx) continue;
        for (int k = 0; k <= cc; k ++) {
          int val = 500 * i + 100 * j + 50 * k;
          if (val == xx ) count = count + 1;
          //System.out.println(i + "," + j + "," + k + "," + val + "," + count);
        }
      } {
        if ((500 * i + 100 * j) > xx) continue;
        for (int k = 0; k <= cc; k ++) {
          int val = 500 * i + 100 * j + 50 * k;
          if (val == xx ) count = count + 1;
          //System.out.println(i + "," + j + "," + k + "," + val + "," + count);
        }
      } if ((500 * i + 100 * j) > xx) continue; (500 * i + 100 * j) > xx (500 * i + 100 * j) 500 * i 500 i 100 * j 100 j xx continue; for (int k = 0; k <= cc; k ++) {
          int val = 500 * i + 100 * j + 50 * k;
          if (val == xx ) count = count + 1;
          //System.out.println(i + "," + j + "," + k + "," + val + "," + count);
        } int k = 0; int k = 0; k 0 k <= cc k cc k ++ k ++ k {
          int val = 500 * i + 100 * j + 50 * k;
          if (val == xx ) count = count + 1;
          //System.out.println(i + "," + j + "," + k + "," + val + "," + count);
        } {
          int val = 500 * i + 100 * j + 50 * k;
          if (val == xx ) count = count + 1;
          //System.out.println(i + "," + j + "," + k + "," + val + "," + count);
        } int val = 500 * i + 100 * j + 50 * k; val 500 * i + 100 * j + 50 * k 500 * i + 100 * j + 50 * k 500 * i 500 i 100 * j 100 j 50 * k 50 k if (val == xx ) count = count + 1; val == xx val xx count = count + 1 count count + 1 count 1 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) throws Exception {
    String line = null;
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int aa = Integer.parseInt(br.readLine());
    int bb = Integer.parseInt(br.readLine());
    int cc = Integer.parseInt(br.readLine());
    int xx = Integer.parseInt(br.readLine());
    int count = 0;
    for (int i = 0; i <= aa; i ++) {
      if (500 * i > xx) continue;
      for (int j = 0; j <= bb; j ++) {
        if ((500 * i + 100 * j) > xx) continue;
        for (int k = 0; k <= cc; k ++) {
          int val = 500 * i + 100 * j + 50 * k;
          if (val == xx ) count = count + 1;
          //System.out.println(i + "," + j + "," + k + "," + val + "," + count);
        }
      }
    }
    System.out.println(count);
  }
} public class Main {
  public static void main(String[] args) throws Exception {
    String line = null;
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int aa = Integer.parseInt(br.readLine());
    int bb = Integer.parseInt(br.readLine());
    int cc = Integer.parseInt(br.readLine());
    int xx = Integer.parseInt(br.readLine());
    int count = 0;
    for (int i = 0; i <= aa; i ++) {
      if (500 * i > xx) continue;
      for (int j = 0; j <= bb; j ++) {
        if ((500 * i + 100 * j) > xx) continue;
        for (int k = 0; k <= cc; k ++) {
          int val = 500 * i + 100 * j + 50 * k;
          if (val == xx ) count = count + 1;
          //System.out.println(i + "," + j + "," + k + "," + val + "," + count);
        }
      }
    }
    System.out.println(count);
  }
} Main
import java.io.*;
import java.util.*;
public class Main {
  public static void main(String[] args) throws Exception {
    String line = null;
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int aa = Integer.parseInt(br.readLine());
    int bb = Integer.parseInt(br.readLine());
    int cc = Integer.parseInt(br.readLine());
    int xx = Integer.parseInt(br.readLine());
    int count = 0;
    for (int i = 0; i <= aa; i ++) {
      if (500 * i > xx) continue;
      for (int j = 0; j <= bb; j ++) {
        if ((500 * i + 100 * j) > xx) continue;
        for (int k = 0; k <= cc; k ++) {
          int val = 500 * i + 100 * j + 50 * k;
          if (val == xx ) count = count + 1;
          //System.out.println(i + "," + j + "," + k + "," + val + "," + count);
        }
      }
    }
    System.out.println(count);
  }
}