Problem2222--abc242C - 1111gal password

2222: abc242C - 1111gal password

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

Time Limit: 2 sec / Memory Limit: 1024 MB

Score : 300300 points

Problem Statement

Given an integer NN, find the number of integers XX that satisfy all of the following conditions, modulo 998244353998244353.
  • XX is an NN-digit positive integer.
  • Let X_1,X_2,\dots,X_NX1,X2,,XN be the digits of XX from top to bottom. They satisfy all of the following:
    • 1 \le X_i \le 91Xi9 for all integers 1 \le i \le N1iN;
    • |X_i-X_{i+1}| \le 1XiXi+11 for all integers 1 \le i \le N-11iN1.

Constraints

  • NN is an integer.
  • 2 \le N \le 10^62N106

Input

Input is given from Standard Input in the following format:
NN

Output

Print the answer as an integer.

Input


Sample Input Copy

4

Sample Output Copy

203

Source/Category