{"raw_statement":[{"iden":"problem statement","content":"You are given an integer $N$. Find the number of pairs of integers $(x, y)$ that satisfy the following conditions, modulo $998244353$.\n\n*   $1 \\leq x,y \\leq N$.\n    \n*   $x^2-y$ is a square number. (Assume $0$ is also a square number.)"},{"iden":"constraints","content":"*   $1 \\leq N \\leq 10^{12}$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$"},{"iden":"sample input 1","content":"3"},{"iden":"sample output 1","content":"2\n\nWe have the following two pairs.\n\n*   $x=1,y=1$\n    \n*   $x=2,y=3$"},{"iden":"sample input 2","content":"10"},{"iden":"sample output 2","content":"8"},{"iden":"sample input 3","content":"10000000000"},{"iden":"sample output 3","content":"52583544"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}