#arc143f. [arc143_f]Counting Subsets

[arc143_f]Counting Subsets

Problem Statement

Given a positive integer NN, find the number, modulo 998244353998244353, of subsets SS of 1,2,ldots,N\\{1, 2, \\ldots, N\\} that satisfy the following condition.

  • Every positive integer at most NN can be represented as the sum of some distinct elements of SS, and there are at most two such representations.

Constraints

  • 1leqNleq15001 \\leq N \\leq 1500

Input

Input is given from Standard Input in the following format:

NN

Output

Print the answer.


Sample Input 1

3

Sample Output 1

2

The subsets 1,2\\{1,2\\} and 1,2,3\\{1,2,3\\} satisfy the condition.


Sample Input 2

5

Sample Output 2

5

Sample Input 3

1000

Sample Output 3

742952024