PRINTING BROCHURE#8301

PRINTING BROCHURE

1 second
64 megabytes
Medium

Vasyl is preparing for the regional informatics olympiad and has decided to create a text document detailing the most well-known algorithms. This document is formatted in a Microsoft Word file using pages, with a total of pages. To make reading easier, Vasyl wants to print the document as a booklet. This means that when the sheets are folded in half, the pages appear in the correct order, using the minimum number of sheets. Each sheet will have two pages printed on each side (left and right), reduced by half.

For instance, to print a document with pages, the print settings should specify the pages in the order 4, 1, 2, 3.

zz42_-.jpg

In some cases, to ensure the pages are printed correctly, empty pages may need to be added at the end of the document. Vasyl will add only one empty page at the end, which will be printed multiple times wherever an empty page is required.

For example, to print a document with pages, Vasyl adds one empty page and specifies the pages 3, 1, 2, 3 in the print settings.

zz42-.jpg

Input

An integer (1 \leq N \leq 1000000), representing the number of pages in the document.

Output

The first line should contain the number of sheets needed to print the document.

The second line should list the page numbers to be specified in the print settings, separated by spaces.

Examples

Example 1

Loading
Loading