{"raw_statement":[{"iden":"problem statement","content":"You are given an integer sequence $A=(A_1,A_2,\\cdots,A_N)$ of length $N$.\nYou will perform the following operation exactly once:\n\n*   Choose a non-empty subsequence of $A$ (not necessarily contiguous) and replace it with its cumulative sums. More precisely, first choose a sequence of indices $(i_1,i_2,\\cdots,i_k)$ such that $1 \\leq i_1 < i_2 < \\cdots < i_k \\leq N$. The length of the sequence $k$ ($1 \\leq k \\leq N$) can be chosen freely. Then, for each $j$ ($1 \\leq j \\leq k$), replace the value of $A_{i_j}$ with $\\sum_{1 \\leq x \\leq j} A_{i_x}$. This replacement is done simultaneously for all chosen indices.\n\nFind, modulo $10^9+7$, the number of possible sequences $A$ after the operation."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 100$\n*   $-10 \\leq A_i \\leq 10$\n*   All input values are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$\n$A_1$ $A_2$ $\\cdots$ $A_N$"},{"iden":"sample input 1","content":"3\n1 1 2"},{"iden":"sample output 1","content":"4\n\nThe possible sequences $A$ after the operation are as follows:\n\n*   $A=(1,1,2)$: This can be achieved with $k=1$ and $(i_1)=(1)$.\n*   $A=(1,2,2)$: This can be achieved with $k=2$ and $(i_1,i_2)=(1,2)$.\n*   $A=(1,1,3)$: This can be achieved with $k=2$ and $(i_1,i_2)=(1,3)$.\n*   $A=(1,2,4)$: This can be achieved with $k=3$ and $(i_1,i_2,i_3)=(1,2,3)$."},{"iden":"sample input 2","content":"4\n1 -1 1 -1"},{"iden":"sample output 2","content":"8"},{"iden":"sample input 3","content":"5\n0 0 0 0 0"},{"iden":"sample output 3","content":"1"},{"iden":"sample input 4","content":"40\n2 -2 1 3 -3 -1 -2 -3 0 -1 -2 0 -3 0 0 2 0 -1 2 -2 -2 -1 3 -2 -2 -2 2 3 2 -3 0 -2 2 1 3 0 -1 0 -2 -3"},{"iden":"sample output 4","content":"420429545"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}