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?

Input

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

Output

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

Examples

Input


8


Output


1


Input


1


Output


1

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.
# -*- coding: utf-8 -*- 
import heapq, math, random, re, string, sys
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from decimal import Decimal, getcontext
from fractions import gcd, Fraction
from itertools import combinations, permutations, product
from math import ceil, exp, log, sqrt
from Queue import Queue, PriorityQueue

getcontext().prec = 100
sys.setrecursionlimit(100000)
MOD = 10 ** 9 + 7
INF = float('+inf')
'''
if sys.subversion[0] == "PyPy":
    import io, atexit
    sys.stdout = io.BytesIO()
    atexit.register(lambda: sys.__stdout__.write(sys.stdout.getvalue()))
    sys.stdin = io.BytesIO(sys.stdin.read())
    raw_input = lambda: sys.stdin.readline().rstrip()
'''
pr = lambda args: sys.stdout.write(' '.join(map(str, args)) + '\n')
epr = lambda args: sys.stderr.write(' '.join(map(str, args)) + '\n')
die = lambda args: pr(args) ^ exit(0)

n = input()
#a = [input()for _ in xrange(n)]
#n, m = map(int, raw_input().split())
#a = [map(int,raw_input().split())for _ in xrange(n)]
#s = raw_input()
#a = [raw_input() for _ in xrange(n)]

if n > 2:
	print 1
else:
	print n