- Time limit: 1.00 s
- Memory limit: 512 MB
There is a line of lanterns, numbered . Initially, at time , only lantern is on, and all others are off.
At time , the 'th lantern is on if exactly one of lanterns or was on at time . There are two special cases: Lantern is never on at time , and lantern is on at time if lantern is on at time .
For every time , find out how many lanterns are on.
Input
The first line of input contains a single integer .
Output
Output integers , where is the amount of lanterns on at time .
Constraints
Example
Input:
6
Output:
1 2 2 3 1 1
Explanation:
0: 100000 1: 011000 2: 001010 3: 000111 4: 000010 5: 000001
Where the number on the left is the time , and the 'th bit is 1
if lantern is on at time , and 0
otherwise.