407431: GYM102788 I Hole Punch

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

I. Hole Punchtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

The task is to punch n identical holes along the central axis of a narrow paper tape. The holes should be $$$1$$$ cm apart and $$$n$$$ identical holes must be punched (where $$$n$$$ is always an even number). A hole punch always makes two holes at once, $$$k$$$ cm apart. Let's count that it is prohibited to make one hole with the punch. The available set of hole punches covers all possible distances between the holes, i.e. $$$k=1, k=2, k=3$$$, etc. Your task is to write a program that will use the number $$$n$$$ to list hole punches with the distance $$$k$$$ suitable for the job.

Input

The input file contains a single positive integer $$$n (1 \le n \le 10 ^ 9, n -- even number)$$$.

Output

The first line of the output file contains a positive integer $$$k$$$ ($$$1 \le k \le n$$$) – the number of suitable hole punches. The second line contains $$$k$$$ positive integers separated by spaces and listed in the ascending order.

ExampleInput
8
Output
3
1 2 4

加入题单

算法标签: