{"raw_statement":[{"iden":"problem statement","content":"There is a row of $N$ squares labeled $1,2,\\dots,N$ and a sequence $A=(A_1,A_2,\\dots,A_N)$ of length $N$.  \nInitially, square $1$ is painted black, the other $N-1$ squares are painted white, and a piece is placed on square $1$.\nYou may repeat the following operation any number of times, possibly zero:\n\n*   When the piece is on square $i$, choose a positive integer $x$ and move the piece to square $i + A_i \\times x$.\n    *   Here, you cannot make a move with $i + A_i \\times x > N$.\n*   Then, paint the square $i + A_i \\times x$ black.\n\nFind the number of possible sets of squares that can be painted black at the end of the operations, modulo $998244353$."},{"iden":"constraints","content":"*   All input values are integers.\n*   $1 \\le N \\le 2 \\times 10^5$\n*   $1 \\le A_i \\le 2 \\times 10^5$"},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$\n$A_1$ $A_2$ $\\dots$ $A_N$"},{"iden":"sample input 1","content":"5\n1 2 3 1 1"},{"iden":"sample output 1","content":"8\n\nThere are eight possible sets of squares painted black:\n\n*   Square $1$\n*   Squares $1,2$\n*   Squares $1,2,4$\n*   Squares $1,2,4,5$\n*   Squares $1,3$\n*   Squares $1,4$\n*   Squares $1,4,5$\n*   Squares $1,5$"},{"iden":"sample input 2","content":"1\n200000"},{"iden":"sample output 2","content":"1"},{"iden":"sample input 3","content":"40\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1"},{"iden":"sample output 3","content":"721419738\n\nBe sure to find the number modulo $998244353$."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}