import java.util.*;


public class Main {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        int count = 0;
        int count500yen = sc.nextInt();
        int count100yen = sc.nextInt();
        int count50yen = sc.nextInt();
        int answerAmount = sc.nextInt();
        
        for (int i = 0; i <= count500yen; i++) {
            for (int j = 0; j <= count100yen; j++) {
                for (int k = 0; k <= count50yen; k++) {
                    int amount = 500 * i + 100 * j + 50 * k;
                    if (amount == answerAmount) count++;
                }
            }
        }

        System.out.println(count);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        int count = 0;
        int count500yen = sc.nextInt();
        int count100yen = sc.nextInt();
        int count50yen = sc.nextInt();
        int answerAmount = sc.nextInt();
        
        for (int i = 0; i <= count500yen; i++) {
            for (int j = 0; j <= count100yen; j++) {
                for (int k = 0; k <= count50yen; k++) {
                    int amount = 500 * i + 100 * j + 50 * k;
                    if (amount == answerAmount) count++;
                }
            }
        }

        System.out.println(count);
    }
} Main public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        int count = 0;
        int count500yen = sc.nextInt();
        int count100yen = sc.nextInt();
        int count50yen = sc.nextInt();
        int answerAmount = sc.nextInt();
        
        for (int i = 0; i <= count500yen; i++) {
            for (int j = 0; j <= count100yen; j++) {
                for (int k = 0; k <= count50yen; k++) {
                    int amount = 500 * i + 100 * j + 50 * k;
                    if (amount == answerAmount) count++;
                }
            }
        }

        System.out.println(count);
    } main {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        int count = 0;
        int count500yen = sc.nextInt();
        int count100yen = sc.nextInt();
        int count50yen = sc.nextInt();
        int answerAmount = sc.nextInt();
        
        for (int i = 0; i <= count500yen; i++) {
            for (int j = 0; j <= count100yen; j++) {
                for (int k = 0; k <= count50yen; k++) {
                    int amount = 500 * i + 100 * j + 50 * k;
                    if (amount == answerAmount) count++;
                }
            }
        }

        System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int count = 0; count 0 int count500yen = sc.nextInt(); count500yen sc.nextInt() sc.nextInt sc int count100yen = sc.nextInt(); count100yen sc.nextInt() sc.nextInt sc int count50yen = sc.nextInt(); count50yen sc.nextInt() sc.nextInt sc int answerAmount = sc.nextInt(); answerAmount sc.nextInt() sc.nextInt sc for (int i = 0; i <= count500yen; i++) {
            for (int j = 0; j <= count100yen; j++) {
                for (int k = 0; k <= count50yen; k++) {
                    int amount = 500 * i + 100 * j + 50 * k;
                    if (amount == answerAmount) count++;
                }
            }
        } int i = 0; int i = 0; i 0 i <= count500yen i count500yen i++ i++ i {
            for (int j = 0; j <= count100yen; j++) {
                for (int k = 0; k <= count50yen; k++) {
                    int amount = 500 * i + 100 * j + 50 * k;
                    if (amount == answerAmount) count++;
                }
            }
        } {
            for (int j = 0; j <= count100yen; j++) {
                for (int k = 0; k <= count50yen; k++) {
                    int amount = 500 * i + 100 * j + 50 * k;
                    if (amount == answerAmount) count++;
                }
            }
        } for (int j = 0; j <= count100yen; j++) {
                for (int k = 0; k <= count50yen; k++) {
                    int amount = 500 * i + 100 * j + 50 * k;
                    if (amount == answerAmount) count++;
                }
            } int j = 0; int j = 0; j 0 j <= count100yen j count100yen j++ j++ j {
                for (int k = 0; k <= count50yen; k++) {
                    int amount = 500 * i + 100 * j + 50 * k;
                    if (amount == answerAmount) count++;
                }
            } {
                for (int k = 0; k <= count50yen; k++) {
                    int amount = 500 * i + 100 * j + 50 * k;
                    if (amount == answerAmount) count++;
                }
            } for (int k = 0; k <= count50yen; k++) {
                    int amount = 500 * i + 100 * j + 50 * k;
                    if (amount == answerAmount) count++;
                } int k = 0; int k = 0; k 0 k <= count50yen k count50yen k++ k++ k {
                    int amount = 500 * i + 100 * j + 50 * k;
                    if (amount == answerAmount) count++;
                } {
                    int amount = 500 * i + 100 * j + 50 * k;
                    if (amount == answerAmount) count++;
                } int amount = 500 * i + 100 * j + 50 * k; amount 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 (amount == answerAmount) count++; amount == answerAmount amount answerAmount 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) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        int count = 0;
        int count500yen = sc.nextInt();
        int count100yen = sc.nextInt();
        int count50yen = sc.nextInt();
        int answerAmount = sc.nextInt();
        
        for (int i = 0; i <= count500yen; i++) {
            for (int j = 0; j <= count100yen; j++) {
                for (int k = 0; k <= count50yen; k++) {
                    int amount = 500 * i + 100 * j + 50 * k;
                    if (amount == answerAmount) count++;
                }
            }
        }

        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        int count = 0;
        int count500yen = sc.nextInt();
        int count100yen = sc.nextInt();
        int count50yen = sc.nextInt();
        int answerAmount = sc.nextInt();
        
        for (int i = 0; i <= count500yen; i++) {
            for (int j = 0; j <= count100yen; j++) {
                for (int k = 0; k <= count50yen; k++) {
                    int amount = 500 * i + 100 * j + 50 * k;
                    if (amount == answerAmount) count++;
                }
            }
        }

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


public class Main {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        int count = 0;
        int count500yen = sc.nextInt();
        int count100yen = sc.nextInt();
        int count50yen = sc.nextInt();
        int answerAmount = sc.nextInt();
        
        for (int i = 0; i <= count500yen; i++) {
            for (int j = 0; j <= count100yen; j++) {
                for (int k = 0; k <= count50yen; k++) {
                    int amount = 500 * i + 100 * j + 50 * k;
                    if (amount == answerAmount) count++;
                }
            }
        }

        System.out.println(count);
    }
}