ENG  RUS Timus Online Judge
Online Judge
Problems
Authors
Online contests
Site news
Webboard
Problem set
Submit solution
Judge status
Guide
Register
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules

## 1967. Programmer Casino

Time limit: 1.0 second
Memory limit: 64 MB
The Macau city is referred to as the “Oriental Monte Carlo”. There are more than thirty casinos in Macau. Every year they lure millions of gamblers from China and from other countries. The gambling industry makes up for about 40% of the city's GDP.
Vova learned from his friends in Guangzhou that Macau has special casinos for programmers only. Vova found that quite interesting and he immediately decided to visit a programmer casino. One such casino was located by Vova's hotel, so in the evening he took some cash and went there.
For example, if the croupier reads out the sequence of 1011100101, the first player writes binary letters 1, 1011 and 100101 decimals 1, 11 and 37), and the second player writes 110, 11100 and 101 (decimal 6, 28 and 5), then the winner is the second player as 6285 is less than 11137.
Before joining in the game, Vova decided to learn to play optimally well for the simple case when the croupier's sequence is represented as a binary record of all integers one by one from 2 to n (in the above given example n was equal to five). But as Vova failed to quickly come up with the optimal strategy, he asked you to help him.

### Input

The single line contains an integer n (2 ≤ n ≤ 100 000).

### Output

In the first line print, how many numbers Vova should write down if he plays optimally well. In the second line print the numbers' lengths in bits in the order they are written. If there are multiple solutions that result in the minimum decimal number, print any of them.

inputoutput
```5
```
```2
1 10
```

### Notes

In the sample you need to write down all the digits the croupier reads out into the second number. In this case after the numbers are converted to decimals and glued together, we get number 1741.
Problem Author: Ilya Zvigintsev
Problem Source: Open Ural FU Personal Contest 2013
Tags: none