{"raw_statement":[{"iden":"problem statement","content":"How many different sequences of length $2N$, $A = (A_1, A_2, \\dots, A_{2N})$, satisfy both of the following conditions?\n\n*   The sequence $A$ contains $N$ occurrences of $+1$ and $N$ occurrences of $-1$.\n*   There are exactly $K$ pairs of $l$ and $r$ $(1 \\leq l \\leq r \\leq 2N)$ such that $A_l + A_{l+1} + \\cdots + A_r = 0$."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 30$\n*   $1 \\leq K \\leq N^2$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $K$"},{"iden":"sample input 1","content":"1 1"},{"iden":"sample output 1","content":"2\n\nFor $N = 1, K = 1$, two sequences below satisfy the conditions:\n\n*   $A = (+1, -1)$\n*   $A = (-1, +1)$"},{"iden":"sample input 2","content":"2 3"},{"iden":"sample output 2","content":"2\n\nFor $N = 2, K = 3$, two sequences below satisfy the conditions:\n\n*   $A = (+1, -1, -1, +1)$\n*   $A = (-1, +1, +1, -1)$"},{"iden":"sample input 3","content":"3 7"},{"iden":"sample output 3","content":"6\n\nFor $N = 3, K = 7$, six sequences below satisfy the conditions:\n\n*   $A = (+1, -1, +1, -1, -1, +1)$\n*   $A = (+1, -1, -1, +1, +1, -1)$\n*   $A = (+1, -1, -1, +1, -1, +1)$\n*   $A = (-1, +1, +1, -1, +1, -1)$\n*   $A = (-1, +1, +1, -1, -1, +1)$\n*   $A = (-1, +1, -1, +1, +1, -1)$"},{"iden":"sample input 4","content":"8 24"},{"iden":"sample output 4","content":"568"},{"iden":"sample input 5","content":"30 230"},{"iden":"sample output 5","content":"761128315856702"},{"iden":"sample input 6","content":"25 455"},{"iden":"sample output 6","content":"0\n\nFor $N = 25, K = 455$, no sequences satisfy the conditions."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}