{"raw_statement":[{"iden":"problem statement","content":"You have $A$ $500$\\-yen coins, $B$ $100$\\-yen coins and $C$ $50$\\-yen coins (yen is the currency of Japan). In how many ways can we select some of these coins so that they are $X$ yen in total?\nCoins of the same kind cannot be distinguished. Two ways to select coins are distinguished when, for some kind of coin, the numbers of that coin are different."},{"iden":"constraints","content":"*   $0 \\leq A, B, C \\leq 50$\n*   $A + B + C \\geq 1$\n*   $50 \\leq X \\leq 20$ $000$\n*   $A$, $B$ and $C$ are integers.\n*   $X$ is a multiple of $50$."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$A$\n$B$\n$C$\n$X$"},{"iden":"sample input 1","content":"2\n2\n2\n100"},{"iden":"sample output 1","content":"2\n\nThere are two ways to satisfy the condition:\n\n*   Select zero $500$\\-yen coins, one $100$\\-yen coin and zero $50$\\-yen coins.\n*   Select zero $500$\\-yen coins, zero $100$\\-yen coins and two $50$\\-yen coins."},{"iden":"sample input 2","content":"5\n1\n0\n150"},{"iden":"sample output 2","content":"0\n\nNote that the total must be exactly $X$ yen."},{"iden":"sample input 3","content":"30\n40\n50\n6000"},{"iden":"sample output 3","content":"213"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}