#abc251d. [abc251_d]At Most 3 (Contestant ver.)

[abc251_d]At Most 3 (Contestant ver.)

Problem Statement

You are given an integer WW.
You are going to prepare some weights so that all of the conditions below are satisfied.

  • The number of weights is between 11 and 300300, inclusive.
  • Each weight has a mass of positive integer not exceeding 10610^6.
  • Every integer between 11 and WW, inclusive, is a good integer. Here, a positive integer nn is said to be a good integer if the following condition is satisfied:
    • We can choose at most 33 different weights from the prepared weights with a total mass of nn.

Print a combination of weights that satisfies the conditions.

Constraints

  • 1leqWleq1061 \\leq W \\leq 10^6
  • WW is an integer.

Input

Input is given from Standard Input in the following format:

WW

Output

Print in the following format, where NN is the number of weights and AiA_i is the mass of the ii-th weight. If multiple solutions exist, printing any of them is accepted.

NN A1A_1 A2A_2 dots\\dots ANA_N

Here, NN and A1,A2,dots,ANA_1,A_2,\\dots,A_N should satisfy the following conditions:

  • 1leqNleq3001 \\leq N \\leq 300
  • 1leqAileq1061 \\leq A_i \\leq 10^6

Sample Input 1

6

Sample Output 1

3
1 2 3

In the output above, 33 weights with masses 11, 22, and 33 are prepared.
This output satisfies the conditions. Especially, regarding the 33-rd condition, we can confirm that every integer between 11 and WW, inclusive, is a good integer.

  • If we choose only the 11-st weight, it has a total mass of 11.
  • If we choose only the 22-nd weight, it has a total mass of 22.
  • If we choose only the 33-rd weight, it has a total mass of 33.
  • If we choose the 11-st and the 33-rd weights, they have a total mass of 44.
  • If we choose the 22-nd and the 33-rd weights, they have a total mass of 55.
  • If we choose the 11-st, the 22-nd, and the 33-rd weights, they have a total mass of 66.

Sample Input 2

12

Sample Output 2

6
2 5 1 2 5 1

You may prepare multiple weights with the same mass.