PRINTING BROCHURE
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 A4 pages, with a total of N 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 A4 sheet will have two pages printed on each side (left and right), reduced by half.
For instance, to print a document with 4 pages, the print settings should specify the pages in the order 4,1,2,3.
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 2 pages, Vasyl adds one empty page and specifies the pages 3,1,2,3 in the print settings.
Input
An integer N (1 ≤ N ≤ 1,000,000), 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.