Stones#2901

Stones

2 seconds
256 megabytes
Very hard

Two players play a game with a single pile of stones. On each turn, a player may take any pile and split it into several smaller piles, so that the number of stones in each new pile differs from the others by at least .

For example, if K = 2, a pile of stones can be split into , , , or (1, 3, 5). The player who cannot make a move loses.

Given , find all values of (0 \leq K \leq N) for which the second player has a winning strategy.

Input

The first line contains the natural number (1 \leq N < 100).

Output

Print the total number of such values on the first line. On the second line, print these values in increasing order.

Examples

Example 1

Loading
Loading