I hate 1

AtCoder
IDarc198_a
Time2000ms
Memory256MB
Difficulty
You are given a positive integer $N$. A set $S$ of positive integers between $1$ and $N$ (inclusive) is called a **good set** if it satisfies the following condition: * For every pair of elements $x$ and $y$ in $S$, the remainder when $x$ is divided by $y$ is not $1$. Construct one good set with the maximum possible number of elements. ## Constraints * $1 \le N \le 2 \times 10^{5}$ ## Input The input is given from Standard Input in the following format: $N$ [samples]
Samples
Input #1
5
Output #1
2
3 5

For example, $\lbrace 3,5 \rbrace$ and $\lbrace 2 \rbrace$ are good sets. On the other hand, $\lbrace 2,3,5 \rbrace$ and $\lbrace 1,2,3,4,5 \rbrace$ are not good sets.
No good set with three or more elements exists, so $\lbrace 3,5 \rbrace$ is one of the good sets with the maximum number of elements.
Input #2
2
Output #2
1
2
API Response (JSON)
{
  "problem": {
    "name": "I hate 1",
    "description": {
      "content": "You are given a positive integer $N$. A set $S$ of positive integers between $1$ and $N$ (inclusive) is called a **good set** if it satisfies the following condition: *   For every pair of elements $",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "arc198_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You are given a positive integer $N$. A set $S$ of positive integers between $1$ and $N$ (inclusive) is called a **good set** if it satisfies the following condition:\n\n*   For every pair of elements $...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments