{"raw_statement":[{"iden":"problem statement","content":"Given is a sequence $A$ of length $N$. You can do this operation any number of times: when the length of the sequence is at least $2$, choose two adjacent values, delete them, and insert their sum where they were. How many sequences can result from zero or more operations? Find the count modulo $998244353$."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 2\\times 10^5$\n*   $|A_i| \\leq 10^9$\n*   All values in input are integers."},{"iden":"input","content":"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 1"},{"iden":"sample output 1","content":"4\n\nThe following four sequences can result from zero or more operations.\n\n*   ${1,-1,1}$\n*   ${1,0}$\n*   ${0,1}$\n*   ${1}$"},{"iden":"sample input 2","content":"10\n377914575 -275478149 0 -444175904 719654053 -254224494 -123690081 377914575 -254224494 -21253655"},{"iden":"sample output 2","content":"321"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}