#P1081A. Definite Game
Definite Game
No submission language available for this problem.
Description
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 . Initially the value of equals to and the player is able to do the following operation as many times as the player want (possibly zero): choose a positive integer that and is not a divisor of , then subtract from . The goal of the player is to minimize the value of in the end.
Soon, Chouti found the game trivial. Can you also beat the game?
The input contains only one integer in the first line: (), the initial value of .
Output a single integer, the minimum value of the player can get.
Input
The input contains only one integer in the first line: (), the initial value of .
Output
Output a single integer, the minimum value of the player can get.
Samples
Note
In the first example, the player can choose in the first turn, then becomes . He can then choose in the second turn to get as the result. There are other ways to get this minimum. However, for example, he cannot choose in the first turn because is a divisor of .
In the second example, since initially, the player can do nothing.