K. Magic Tree
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output

Starlight Glimmer has a $$$2$$$-row, $$$m$$$-column grid, with row $$$i$$$ and column $$$j$$$ labeled as $$$(i,j)$$$.

She performs a depth-first search starting from the lattice labeled as $$$(1,1)$$$ (i.e., the first row and first column), and each lattice can reach a lattice that is adjacent to at least one of its edges. Since the search process does not repeatedly visit lattices, a tree can be used to describe the search process.

Now she wants to know how many possible results of the labelled trees there are in total, and to avoid the answer being too large, you need to modulo $$$998244353$$$ to print it.

Formally, we use a stack $$$S$$$ to describe the depth-first search process and a edge set $$$E$$$ to indicate a labelled tree.

In depth-first search process, fristly push lattice $$$(1,1)$$$ in stack $$$S$$$ then goto the process as follows:

  1. If $$$S$$$ is empty, end the process.
  2. Suppose the top element of the stack is $$$(x,y)$$$ whose unvisit legal adjacent lattice is set $$$N$$$.
  3. If $$$N$$$ is empty, pop $$$(x,y)$$$ and goto step $$$1$$$.
  4. Randomly choose an element $$$(z,w)$$$ in $$$N$$$, push it in the stack $$$S$$$ and insert edge $$$(x,y)\rightarrow (z,w)$$$ in edge set $$$E$$$, mark lattice $$$(z,w)$$$ as having been visited.
  5. Goto step $$$1$$$.

For lattice $$$(x,y)$$$, if a lattice $$$(z,w)$$$ satisfies $$$|z-x|+|w-y|=1,z\in \{1,2\},w\in \{1,2,3,\dots,m\}$$$ and havn't been visited, it is a unvisit legal adjacent lattice which will be in set $$$N$$$.

The process may produce many different kinds of edge set $$$E$$$, the number of it is the labelled trees describe above.

Input

The first line contains an integer $$$m$$$ ($$$1\le m\le 10^5$$$) indicating the column of the grid.

Output

Print a single integer, represents the number of trees modulo $$$998244353$$$.

Example
Input
3
Output
4
Note

Next page is a specific illustration of the $$$4$$$ labeled trees when $$$m$$$ equals $$$3$$$.