luogu#P5218. 无聊的水题 II

无聊的水题 II

Background

The problem setter is not skilled, and can only make this kind of problem.

Problem Description

DLS is a boy who likes playing games.

Today, he saw NN weapons from his friend, where the power value of the ii-th weapon is ii.

He observed these NN weapons for a long time and plans to buy some of them, but he wants to use the power values of the weapons he buys to form any power value. The power values of each weapon can be added together, and can even be subtracted.
For example, with a weapon whose power value is 33, the power values that can be formed are ,6,3,0,3,6,\dots,-6,-3,0,3,6,\dots.

He wants to find all purchase plans that satisfy the above condition, but there are too many plans. Can you help him compute it?
Output the answer modulo 109+710^9+7.

Input Format

One line with one integer NN.

Output Format

One line with one integer, representing the answer.

5
26
16
65243

Hint

Percentage of testdata Constraints
10%10\% N20N \le 20
30%30\% N2000N \le 2000
60%60\% N107N \le 10^7
100%100\% N1011N \le 10^{11}

Translated by ChatGPT 5