Problem9759--ABC198 —— F - Cube

9759: ABC198 —— F - Cube

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 512 MiB

Description

Let us write a positive integer on each face of a cube. How many ways are there to do this so that the sum of the six numbers written is $S$?

Here, two ways to write numbers are not distinguished when they only differ by rotation. (Numbers have no direction.)

The count can be enormous, so find it modulo $998244353$.

Input

Input is given from Standard Input in the following format:

```
$S$
```

Output

Print the count modulo $998244353$.

Constraints

-   $6 \leq S \leq 10^{18}$
-   $S$ is an integer.

Sample 1 Input

8

Sample 1 Output

3
We have one way to write 1,1,1,1,1,3 on the cube and two ways to write 1,1,1,1,2,2 (one where we write 2 on adjacent faces and another where we write 2 on opposite faces), for a total of three ways.

Sample 2 Input

9

Sample 2 Output

5

Sample 3 Input

50

Sample 3 Output

80132

10000000000

2239716

Source/Category