import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int fiveHundred = Integer.parseInt(scanner.nextLine());
        int hundred = Integer.parseInt(scanner.nextLine());
        int fifty = Integer.parseInt(scanner.nextLine());
        int money = Integer.parseInt(scanner.nextLine());

        if (money % 100 == 50) {
            if (fifty == 0) {
                System.out.println(0);
                System.exit(0);
            }
            fifty -= 1;
            money -= 50;
        }

        int total = 0;
        for (int i = Math.min(fiveHundred, Math.floorDiv(money, 500)); i >= 0; i--) {
            total += countUp(money - (500 * i), hundred, fifty);
        }
        System.out.println(total);
    }

    public static int countUp(int sum, int hundred, int fifty) {
        int c = 0;
        for (int i = Math.min(hundred, sum / 100); i >= 0; i--) {
            if ((sum - (i * 100)) <= (fifty * 50)) {
                c++;
            }
        }
        return c;
    }
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz