시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 1024 MB151515100.000%

문제

Consider a string $S$ of length $N$ composed of 11 characters: '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '*'.

We will call string $S$ a math string if:

  • The first and last characters of $S$ are neither '+' nor '*'.
  • When two consecutive characters are taken from $S$, at least one of them is neither '+' nor '*'.

Each math string can be treated as an arithmetic expression with integers in decimal notation using ordinary arithmetic operations, where multiplication takes precedence over addition. For each such expression, its value can be calculated: for example, the value of math string "35+2*6" is $47$. Please find the sum of the values of all math strings of the given length $N$, modulo $998\,244\,353$.

입력

The input contains one integer $N$ ($1 \le N \le 10^{18}$).

출력

Print one integer: the answer to the problem.

예제 입력 1

1

예제 출력 1

45

예제 입력 2

3

예제 출력 2

407430

예제 입력 3

1000000000000000000

예제 출력 3

493565653

힌트

In the Example 1, there are only 9 distinct one-digit math strings: the digits from '1' to '9'. The sum of those digits, treated as arithmetic expressions, is equal to $45$.