#Lutece3220. 子集和问题

子集和问题

Migrated from Lutece 3220 子集和问题

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

Tag: 转化,dp

给定正整数 nn,求有多少 {1,2,,n}\{1,2,\dots ,n\} 的子集 SS 满足任意一个 11nn 的整数都能被表示成 SS 的子集和,且方案数小于等于 22

998244353998244353 取模。

Input

一行一个正整数 nn

Output

一行一个整数表示答案。

Samples

3
2
5
5
1000
742952024

Constraints

1n15001\le n\le 1500

Resources

2024 UESTC ICPC Training for Math