Definite Game

题意翻译

# 题目描述 Chouti正在参加一场编程竞赛,然而,当他ak了之后,他觉得很无聊,于是决定发明一些小游戏。 他搞出了这样一个游戏: 玩家有一个正整数$n$,起初,$n$的值等于$v$。 玩家可以进行下列操作任意次(可以是0次): 选择一个正整数$x$,使得$x<n$且$x$不是$n$的因子,就用$x$减$n$。 游戏的最终目标是使$n$的值最小。 很快,Chouti就发现这个游戏很简单。你也能虐这个游戏吗? # 输入输出格式 ## 输入 输入只有一行,包含一个整数$v(1 \leq v \leq 10^9)$,$n$的初值。 ## 输出 输出一个整数,玩家能得到的$n$的最小值。 # 说明 第一个样例中,玩家可以先选择$x = 3$,然后$n$就会变成$5$,然后选择$x = 4$,$n$就会变成$1$. 然而,第一轮玩家不可以选择$x = 2$,因为$2$是$8$的因子。 第二个样例中,由于一开始$n = 1$,所以玩家什么都不需要做。

题目描述

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<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?

输入输出格式

输入格式


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

输出格式


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

输入输出样例

输入样例 #1

8

输出样例 #1

1

输入样例 #2

1

输出样例 #2

1

说明

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.