Strange Joseph and The Knights of Round Table#4462

Strange Joseph and The Knights of Round Table

1 second
64 megabytes
Hard

Old Joseph invented a new game.

people are sitting at the round table. Each participant gets a number starting from . Any two neighbors have consecutive serial numbers, except the first and last participants. Joseph calls two positive integers and (X < Y). The circle is divided into two circles. All the participants with the number from X+1 till Y-1 are sitting at new round table. The participants with numbers from Y+1 till and from till X-1 are sitting in another round table. The participants with the numbers X+1 and Y+1 get the new number . Accordingly, all participants in the new circles are renumbered.

If only one participant remains at the table, he becomes a spectator and that table leaves the game. If there are participants then the table just leaves the game.

Joseph continues to call two positive numbers and the same action happens for all tables. He continues the game while there remain tables with at least two participants.

Joseph asks you to find how many of the initial participants will be spectators at the end, and return their numbers in the start numbering.

Input

Three positive integers are given as input: – the initial number of people (4 \le N \le 10^5), and , – numbers, mentioned by Joseph (1 \le X < Y \le 10^9).

Output

First line will contain one number – the number of people who were taking part in a game and became spectators. In the next line initial numbers of spectators in ascending order. If there are no spectators who transferred from players – print .

Examples

Example 1

Loading
Loading