About Frogs#4918

About Frogs

1 second
64 megabytes
Very easy

Once white and black frogs decided to play a game. They found 2N + 1 tussocks and numbered them from to . Then the frogs occupied the tussocks in such a way that the white frogs sat on the tussocks with numbers from to N - 1, the black frogs sat on the tussocks with numbers from N + 1 to , and the tussock was empty. The goal is to swap the white and black frogs; that is, at the end of the game, the first tussocks must be occupied by the black frogs, and the last tussocks must be occupied by the white frogs.

In this game, the following moves are allowed: frogs may jump only to empty tussocks. A black frog may jump from a tussock numbered i > 0 to the tussock i - 1, or it may jump from a tussock j > 1 to the tussock j - 2 if there is a white frog on the tussock j - 1. Similarly, a white frog may jump from a tussock i < 2N to the tussock i + 1, or it may jump from a tussock j < 2N - 1 to the tussock j + 2 if there is a black frog on the tussock j + 1.

Usually in games, white and black make moves by turns, but here, white and black frogs have the same goal, so they may make moves in any order, and the total number of moves of white frogs may differ from the total number of moves of black frogs. If after one million moves the frogs still have not swapped, they become bored of the game and jump into the water.

Given , determine if the frogs can achieve their goal.

Input

The input is a single integer in the range from to .

Output

If the frogs cannot swap, then output the number . Otherwise, in the first line, output the number of moves needed for the fulfillment of the task, and in the second line, output the sequence of numbers C_i separated by a space (1 \leq i \leq K), where C_i is the number of the tussock from which a jump is performed at the th move. If there are many solutions, you may output any of them.

Examples

Example 1

Loading
Loading