Avito Cool Challenge 2018
A
Definite Game
Codeforces
800
原题
←B →
翻译中…

Chouti was doing a competitive programming competition. However, after having all the problems accepted, he got bored and decided to invent some small games.

翻译中…

He came up with the following game. The player has a positive integer $n$. Initially the value of $n$ equals to $v$ and the player is able to do the following operation as many times as the player want (possibly zero): choose a positive integer $x$ that $x \lt n$ and $x$ is not a divisor of $n$, then subtract $x$ from $n$. The goal of the player is to minimize the value of $n$ in the end.

翻译中…

Soon, Chouti found the game trivial. Can you also beat the game?

翻译中…

Input

翻译中…

The input contains only one integer in the first line: $v$ ($1 \le v \le 10^9$), the initial value of $n$.

翻译中…

Output

翻译中…

Output a single integer, the minimum value of $n$ the player can get.

翻译中…

Note

翻译中…

In the first example, the player can choose $x=3$ in the first turn, then $n$ becomes $5$. He can then choose $x=4$ in the second turn to get $n=1$ as the result. There are other ways to get this minimum. However, for example, he cannot choose $x=2$ in the first turn because $2$ is a divisor of $8$.

翻译中…

In the second example, since $n=1$ initially, the player can do nothing.

翻译中…

样例

Input #1
8
Output #1
1
InputCopy OutputCopy
Input #2
1
Output #2
1
InputCopy OutputCopy
题目信息
题号
1081A
时间限制
1 s
内存限制
256 MB
标签
构造
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。