#P5697. [CEOI 2018] toy

[CEOI 2018] toy

Description

Johnny likes collecting toys. He has many different types of toys, and for each type he has many copies. Two toys of the same type cannot be distinguished.

Emma asks Johnny how many toys he has. However, Johnny does not want to answer.

He tells Emma that if he chooses some toys from all his toys, he can play for nn days. In other words, among these nn days, for any two different days, there exists at least one type of toy for which the selected quantity is different. The empty selection is also allowed.

Emma does not want to compute the answer herself, so she leaves this problem to you. You need to tell her all possible total numbers of toys Johnny could have.

Input Format

The input contains only one integer nn.

Output Format

The first line outputs an integer rr, meaning there are rr possible total numbers of toys Johnny could have.

The next line outputs rr increasing integers, each representing a possible total number of toys Johnny could have.

36
8
6 7 8 10 11 13 18 35

Hint

For 100%100\% of the testdata, 1n1091 \le n \le 10^9.


Problem translation by @StudyFather.

Translated by ChatGPT 5