import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) {

        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        String str1 = null;
        String str2 = null;
        String str3 = null;
        String str4 = null;

        try {
            str1 = br.readLine();
            int cnt500 = Integer.parseInt(str1);

            str2 = br.readLine();
            int cnt100 = Integer.parseInt(str2);

            str3 = br.readLine();
            int cnt50 = Integer.parseInt(str3);

            str4 = br.readLine();
            int cntAll = Integer.parseInt(str4);

            int ptn = 0;

            for (int i = 0 ; i <= cnt500 ; i++) {

                for (int j = 0 ; j <= cnt100 ; j++) {

                    for (int k = 0 ; k <= cnt50 ; k++) {

                    	int money = i*500 + j*100 + k*50;

                    	if (money == cntAll) {
                    		ptn ++;
                    	}

                    }

                }

            }

            br.close();


            System.out.println(ptn);




        } catch (IOException e) {
            e.printStackTrace();
        }


    }

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

    public static void main(String[] args) {

        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        String str1 = null;
        String str2 = null;
        String str3 = null;
        String str4 = null;

        try {
            str1 = br.readLine();
            int cnt500 = Integer.parseInt(str1);

            str2 = br.readLine();
            int cnt100 = Integer.parseInt(str2);

            str3 = br.readLine();
            int cnt50 = Integer.parseInt(str3);

            str4 = br.readLine();
            int cntAll = Integer.parseInt(str4);

            int ptn = 0;

            for (int i = 0 ; i <= cnt500 ; i++) {

                for (int j = 0 ; j <= cnt100 ; j++) {

                    for (int k = 0 ; k <= cnt50 ; k++) {

                    	int money = i*500 + j*100 + k*50;

                    	if (money == cntAll) {
                    		ptn ++;
                    	}

                    }

                }

            }

            br.close();


            System.out.println(ptn);




        } catch (IOException e) {
            e.printStackTrace();
        }


    }

} Main public static void main(String[] args) {

        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        String str1 = null;
        String str2 = null;
        String str3 = null;
        String str4 = null;

        try {
            str1 = br.readLine();
            int cnt500 = Integer.parseInt(str1);

            str2 = br.readLine();
            int cnt100 = Integer.parseInt(str2);

            str3 = br.readLine();
            int cnt50 = Integer.parseInt(str3);

            str4 = br.readLine();
            int cntAll = Integer.parseInt(str4);

            int ptn = 0;

            for (int i = 0 ; i <= cnt500 ; i++) {

                for (int j = 0 ; j <= cnt100 ; j++) {

                    for (int k = 0 ; k <= cnt50 ; k++) {

                    	int money = i*500 + j*100 + k*50;

                    	if (money == cntAll) {
                    		ptn ++;
                    	}

                    }

                }

            }

            br.close();


            System.out.println(ptn);




        } catch (IOException e) {
            e.printStackTrace();
        }


    } main {

        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        String str1 = null;
        String str2 = null;
        String str3 = null;
        String str4 = null;

        try {
            str1 = br.readLine();
            int cnt500 = Integer.parseInt(str1);

            str2 = br.readLine();
            int cnt100 = Integer.parseInt(str2);

            str3 = br.readLine();
            int cnt50 = Integer.parseInt(str3);

            str4 = br.readLine();
            int cntAll = Integer.parseInt(str4);

            int ptn = 0;

            for (int i = 0 ; i <= cnt500 ; i++) {

                for (int j = 0 ; j <= cnt100 ; j++) {

                    for (int k = 0 ; k <= cnt50 ; k++) {

                    	int money = i*500 + j*100 + k*50;

                    	if (money == cntAll) {
                    		ptn ++;
                    	}

                    }

                }

            }

            br.close();


            System.out.println(ptn);




        } catch (IOException e) {
            e.printStackTrace();
        }


    } InputStreamReader isr = new InputStreamReader(System.in); isr new InputStreamReader(System.in) BufferedReader br = new BufferedReader(isr); br new BufferedReader(isr) String str1 = null; str1 null String str2 = null; str2 null String str3 = null; str3 null String str4 = null; str4 null try {
            str1 = br.readLine();
            int cnt500 = Integer.parseInt(str1);

            str2 = br.readLine();
            int cnt100 = Integer.parseInt(str2);

            str3 = br.readLine();
            int cnt50 = Integer.parseInt(str3);

            str4 = br.readLine();
            int cntAll = Integer.parseInt(str4);

            int ptn = 0;

            for (int i = 0 ; i <= cnt500 ; i++) {

                for (int j = 0 ; j <= cnt100 ; j++) {

                    for (int k = 0 ; k <= cnt50 ; k++) {

                    	int money = i*500 + j*100 + k*50;

                    	if (money == cntAll) {
                    		ptn ++;
                    	}

                    }

                }

            }

            br.close();


            System.out.println(ptn);




        } catch (IOException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } IOException e {
            e.printStackTrace();
        } e.printStackTrace() e.printStackTrace e {
            str1 = br.readLine();
            int cnt500 = Integer.parseInt(str1);

            str2 = br.readLine();
            int cnt100 = Integer.parseInt(str2);

            str3 = br.readLine();
            int cnt50 = Integer.parseInt(str3);

            str4 = br.readLine();
            int cntAll = Integer.parseInt(str4);

            int ptn = 0;

            for (int i = 0 ; i <= cnt500 ; i++) {

                for (int j = 0 ; j <= cnt100 ; j++) {

                    for (int k = 0 ; k <= cnt50 ; k++) {

                    	int money = i*500 + j*100 + k*50;

                    	if (money == cntAll) {
                    		ptn ++;
                    	}

                    }

                }

            }

            br.close();


            System.out.println(ptn);




        } str1 = br.readLine() str1 br.readLine() br.readLine br int cnt500 = Integer.parseInt(str1); cnt500 Integer.parseInt(str1) Integer.parseInt Integer str1 str2 = br.readLine() str2 br.readLine() br.readLine br int cnt100 = Integer.parseInt(str2); cnt100 Integer.parseInt(str2) Integer.parseInt Integer str2 str3 = br.readLine() str3 br.readLine() br.readLine br int cnt50 = Integer.parseInt(str3); cnt50 Integer.parseInt(str3) Integer.parseInt Integer str3 str4 = br.readLine() str4 br.readLine() br.readLine br int cntAll = Integer.parseInt(str4); cntAll Integer.parseInt(str4) Integer.parseInt Integer str4 int ptn = 0; ptn 0 for (int i = 0 ; i <= cnt500 ; i++) {

                for (int j = 0 ; j <= cnt100 ; j++) {

                    for (int k = 0 ; k <= cnt50 ; k++) {

                    	int money = i*500 + j*100 + k*50;

                    	if (money == cntAll) {
                    		ptn ++;
                    	}

                    }

                }

            } int i = 0 ; int i = 0 ; i 0 i <= cnt500 i cnt500 i++ i++ i {

                for (int j = 0 ; j <= cnt100 ; j++) {

                    for (int k = 0 ; k <= cnt50 ; k++) {

                    	int money = i*500 + j*100 + k*50;

                    	if (money == cntAll) {
                    		ptn ++;
                    	}

                    }

                }

            } {

                for (int j = 0 ; j <= cnt100 ; j++) {

                    for (int k = 0 ; k <= cnt50 ; k++) {

                    	int money = i*500 + j*100 + k*50;

                    	if (money == cntAll) {
                    		ptn ++;
                    	}

                    }

                }

            } for (int j = 0 ; j <= cnt100 ; j++) {

                    for (int k = 0 ; k <= cnt50 ; k++) {

                    	int money = i*500 + j*100 + k*50;

                    	if (money == cntAll) {
                    		ptn ++;
                    	}

                    }

                } int j = 0 ; int j = 0 ; j 0 j <= cnt100 j cnt100 j++ j++ j {

                    for (int k = 0 ; k <= cnt50 ; k++) {

                    	int money = i*500 + j*100 + k*50;

                    	if (money == cntAll) {
                    		ptn ++;
                    	}

                    }

                } {

                    for (int k = 0 ; k <= cnt50 ; k++) {

                    	int money = i*500 + j*100 + k*50;

                    	if (money == cntAll) {
                    		ptn ++;
                    	}

                    }

                } for (int k = 0 ; k <= cnt50 ; k++) {

                    	int money = i*500 + j*100 + k*50;

                    	if (money == cntAll) {
                    		ptn ++;
                    	}

                    } int k = 0 ; int k = 0 ; k 0 k <= cnt50 k cnt50 k++ k++ k {

                    	int money = i*500 + j*100 + k*50;

                    	if (money == cntAll) {
                    		ptn ++;
                    	}

                    } {

                    	int money = i*500 + j*100 + k*50;

                    	if (money == cntAll) {
                    		ptn ++;
                    	}

                    } int money = i*500 + j*100 + k*50; money i*500 + j*100 + k*50 i*500 + j*100 + k*50 i*500 i 500 j*100 j 100 k*50 k 50 if (money == cntAll) {
                    		ptn ++;
                    	} money == cntAll money cntAll {
                    		ptn ++;
                    	} ptn ++ ptn br.close() br.close br System.out.println(ptn) System.out.println System.out System System.out ptn String[] args args public class Main {

    public static void main(String[] args) {

        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        String str1 = null;
        String str2 = null;
        String str3 = null;
        String str4 = null;

        try {
            str1 = br.readLine();
            int cnt500 = Integer.parseInt(str1);

            str2 = br.readLine();
            int cnt100 = Integer.parseInt(str2);

            str3 = br.readLine();
            int cnt50 = Integer.parseInt(str3);

            str4 = br.readLine();
            int cntAll = Integer.parseInt(str4);

            int ptn = 0;

            for (int i = 0 ; i <= cnt500 ; i++) {

                for (int j = 0 ; j <= cnt100 ; j++) {

                    for (int k = 0 ; k <= cnt50 ; k++) {

                    	int money = i*500 + j*100 + k*50;

                    	if (money == cntAll) {
                    		ptn ++;
                    	}

                    }

                }

            }

            br.close();


            System.out.println(ptn);




        } catch (IOException e) {
            e.printStackTrace();
        }


    }

} public class Main {

    public static void main(String[] args) {

        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        String str1 = null;
        String str2 = null;
        String str3 = null;
        String str4 = null;

        try {
            str1 = br.readLine();
            int cnt500 = Integer.parseInt(str1);

            str2 = br.readLine();
            int cnt100 = Integer.parseInt(str2);

            str3 = br.readLine();
            int cnt50 = Integer.parseInt(str3);

            str4 = br.readLine();
            int cntAll = Integer.parseInt(str4);

            int ptn = 0;

            for (int i = 0 ; i <= cnt500 ; i++) {

                for (int j = 0 ; j <= cnt100 ; j++) {

                    for (int k = 0 ; k <= cnt50 ; k++) {

                    	int money = i*500 + j*100 + k*50;

                    	if (money == cntAll) {
                    		ptn ++;
                    	}

                    }

                }

            }

            br.close();


            System.out.println(ptn);




        } catch (IOException e) {
            e.printStackTrace();
        }


    }

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) {

        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        String str1 = null;
        String str2 = null;
        String str3 = null;
        String str4 = null;

        try {
            str1 = br.readLine();
            int cnt500 = Integer.parseInt(str1);

            str2 = br.readLine();
            int cnt100 = Integer.parseInt(str2);

            str3 = br.readLine();
            int cnt50 = Integer.parseInt(str3);

            str4 = br.readLine();
            int cntAll = Integer.parseInt(str4);

            int ptn = 0;

            for (int i = 0 ; i <= cnt500 ; i++) {

                for (int j = 0 ; j <= cnt100 ; j++) {

                    for (int k = 0 ; k <= cnt50 ; k++) {

                    	int money = i*500 + j*100 + k*50;

                    	if (money == cntAll) {
                    		ptn ++;
                    	}

                    }

                }

            }

            br.close();


            System.out.println(ptn);




        } catch (IOException e) {
            e.printStackTrace();
        }


    }

}