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 \le v \le 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.

Difficulty: EASY

Solutions:
v = int(input())
if v != 2:
	print('1')
else:
	print('2')


n = int(input())
if n == 2:
	print(2)
else:
	print(1)


entrada = int(input())
if entrada == 2:
	print(2)
else:
	print(1)


n = int(input())
temp = n
for i in range(temp, 1, -1):
	if n % i != 0:
		if n - i > 0:
			n -= i
		else:
			break
print(n)


v = int(input())
if v == 1:
	print(1)
if v == 2:
	print(2)
else:
	for i in range(v):
		if v % (v - i) != 0:
			print(v % (v - i))
			break


n = int(input())
if 1 == n:
	print(1)
	exit(0)
if 2 == n:
	print(2)
	exit(0)
print(1)


t = int(input())
if t == 2:
	print(2)
else:
	print(1)


n = int(input())
if n % 2 != 0:
	print(1)
elif n > 3:
	print(1)
else:
	print(2)


print((input() == '2') + 1)


x = int(input())
if x <= 2:
	print(x)
else:
	print(1)


a = input()
a = int(a)
if a == 2:
	print(2)
else:
	print(1)


def main():
	n = int(input())
	print(1 if n != 2 else 2)
main()


if input() == '2':
	print(2)
else:
	print(1)


def solution(v):
	if v == 2:
		return 2
	else:
		return 1

def main():
	v = int(input())
	print(solution(v))
main()


def f(n):
	if n == 2:
		return 2
	else:
		return 1
n = int(input())
print(f(n))


def rint():
	return int(input())

def rints():
	return list(map(int, input().split()))
print(1 if rint() != 2 else 2)


from collections import deque as de
import math
from collections import Counter as cnt
from functools import reduce
from typing import MutableMapping
from itertools import groupby as gb
from fractions import Fraction as fr

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

class My_stack:

	def __init__(self):
		self.data = []

	def my_push(self, x):
		return self.data.append(x)

	def my_pop(self):
		return self.data.pop()

	def my_peak(self):
		return self.data[-1]

	def my_contains(self, x):
		return self.data.count(x)

	def my_show_all(self):
		return self.data

	def isEmpty(self):
		return len(self.data) == 0
arrStack = My_stack()

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def get_prime_factors(number):
	prime_factors = []
	while number % 2 == 0:
		prime_factors.append(2)
		number = number / 2
	for i in range(3, int(math.sqrt(number)) + 1, 2):
		while number % i == 0:
			prime_factors.append(int(i))
			number = number / i
	if number > 2:
		prime_factors.append(int(number))
	return prime_factors

def get_frequency(list):
	dic = {}
	for ele in list:
		if ele in dic:
			dic[ele] += 1
		else:
			dic[ele] = 1
	return dic

def Log2(x):
	return math.log10(x) / math.log10(2)

def isPowerOfTwo(n):
	return math.ceil(Log2(n)) == math.floor(Log2(n))

def ceildiv(x, y):
	return (x + y - 1) // y
n = int(input())
if n == 2:
	print(2)
else:
	print(1)


def do():
	n = int(input())
	if n == 1:
		print(1)
	elif n == 2:
		print(2)
	else:
		print(1)
do()


n = int(input())
i = 2
while n > 2:
	for i in range(n, 0, -1):
		if n % i != 0:
			n = n - i
			break
print(n)


a = int(input())
if a == 0:
	print(0)
elif a == 2:
	print(2)
else:
	print(1)


read_int = lambda : int(input())
n = read_int()
result = 2 if n == 2 else 1
print(result)


x = eval(input())
if x == 2:
	print(2)
else:
	print(1)


import sys
from math import ceil, floor
input = sys.stdin.readline
n = int(input())
if n == 2:
	print(2)
else:
	print(1)


v = int(input())
print(v if v < 3 else 1)


N = int(input())
if N == 2:
	print(2)
else:
	print(1)


n = int(input())
if n < 3:
	print(n)
else:
	print(n - (n - 1))


import sys
pin = sys.stdin.readline
pout = sys.stdout.write
ran = range
n = int(pin())
if n <= 2:
	print(n)
else:
	print(1)


import sys
from math import *

def minp():
	return sys.stdin.readline().strip()

def mint():
	return int(minp())

def mints():
	return map(int, minp().split())
a = mint()
if a == 2:
	print(2)
else:
	print(1)


from operator import itemgetter
v = int(input())
if v != 2:
	print(1)
else:
	print(2)


n = int(input())
if n == 0 or n == 2:
	print(n)
else:
	print('1')


print('21'[input() != '2'])


import sys
t = int(input())
if t == 2:
	print(2)
else:
	print(1)


n = int(input())
v = n
while True:
	if n == 1 or n == 2:
		print(n)
		break
	elif n % v != 0:
		print(n - v)
		break
	else:
		v -= 1


IL = lambda : list(map(int, input().split()))
v = input()
print(1 + (v == '2'))


def main():
	d = int(input())
	print(1 if d != 2 else 2)
main()


i = int(input())
if i == 2:
	print(2)
else:
	print(1)


n = int(input())
for x in range(n - 1, 0, -1):
	if n % x != 0:
		if n - x <= 0:
			break
		else:
			n -= x
print(n)


import sys
from collections import *
from math import *
import re

def inp_arr():
	return list(map(int, input().split()))

def inp():
	return map(int, input().split())

def lcm(a, b):
	return a * b / gcd(a, b)

def iseven(n):
	return [False, True][0 if n % 2 else 1]
max_int = sys.maxsize
mod = 10 ** 9 + 7
n = int(input())
print(n if n <= 2 else 1)


def inint():
	return int(input())

def inlist():
	return list(map(int, input().split()))

def main():
	n = inint()
	if n == 2:
		print(n)
	else:
		print(1)
main()


inp = int(input())
if inp == 2:
	print(2)
else:
	print(1)


v = int(input())
i = v - 1
while i >= 0:
	if i == 0:
		break
	elif v % i != 0:
		v -= i
		i = v - 1
	i -= 1
print(v)


n = int(input())
i = n - 1
while n > 1 and i > 0:
	if n % i != 0:
		n = n - i
	i -= 1
print(n)


v = int(input())
if v == 1:
	print(1)
	exit(0)
elif v == 2:
	print(2)
	exit(0)
for i in range(v - 1, 0, -1):
	if v % i != 0:
		print(v - i)
		break


v = int(input())
n = v
i = n - 1
while i > 0:
	x = i
	if n == 1:
		break
	if n % x != 0:
		n = n - x
	i -= 1
print(n)


n = int(input())
x = n - 1
if x != 0 and n % x != 0:
	print(n - x)
else:
	print(n)


n = int(input().split()[0])
if n > 2:
	print(n - (n - 1))
else:
	print(n)


from sys import stdin
from collections import Counter
from math import sqrt, factorial, log10, log, floor, ceil
from itertools import permutations, combinations, combinations_with_replacement
input = stdin.readline

def li():
	return list(map(int, input().split()))

def lis():
	return list(map(str, input().split()))

def mp():
	return map(int, input().split())

def inp():
	return int(input())

def inps():
	return str(input().strip())

def pr(n):
	return stdout.write(str(n) + '\n')
INF = float('inf')

def solve():
	n = inp()
	if n == 2:
		print(2)
		return
	print(1)
t = 1
for i in range(t):
	solve()


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def main():
	n = I()
	if n == 2:
		return 2
	return 1
print(main())


def main():
	a = int(input())
	if a != 2:
		print(1)
	else:
		print(2)
main()


r = int(input())
if r == 2:
	print(2)
else:
	print(1)


n = int(input())
if n > 2 or n == 1:
	print('1')
elif n == 2:
	print('2')


v = int(input())
if v == 1:
	ans = 1
elif v == 2:
	ans = 2
else:
	ans = 1
print(ans)


import math, sys
from fractions import *

def mp():
	return list(map(int, input().split()))

def main():
	n = int(input())
	if n == 2:
		print(2)
		return
	print(1)
deb = 0
if deb:
	file = open('input.txt', 'w')
else:
	input = sys.stdin.readline
main()


k = int(input())
if k == 2:
	print(2)
else:
	print(1)


m = int(input())
if m == 2:
	print(2)
else:
	print(1)


import math

def min_n(v):
	n = v
	while True:
		cur = n - 1
		while cur > 1 and n % cur == 0:
			cur -= 1
		if cur > 1:
			n -= cur
		else:
			return n
v = int(input())
print(min_n(v))


n = int(input())
print([1, n][n < 3])


__author__ = 'Obriel Muga'

def resolve(valor_inicial, valor_actual):
	if valor_actual == 1:
		return 1
	elif valor_actual == 2:
		return 2
	else:
		for i in range(valor_actual - 1, 1, -1):
			if valor_inicial % i != 0:
				return resolve(valor_inicial, valor_actual - i)
n = int(input())
print(resolve(n, n))


__author__ = 'Dilshod'
a = int(input())
if a == 2:
	print(a)
else:
	print(1)


a = int(input())
print([1, 2][a == 2])


x = int(input())
i = x - 1
while x != 1 and x != 2:
	if x % i != 0:
		x -= i
	i -= 1
print(x)


s = input()
if s != '2':
	s = '1'
print(s)


import sys

def main():
	n = int(sys.stdin.read().strip())
	return n != 2 and 1 or 2
print(main())


x = int(input())
if x < 3:
	print(x)
else:
	print(1)


s = int(input())
if s == 2 or s == 1:
	print(s)
else:
	print(1)


gi = lambda : list(map(int, input().split()))
(n,) = gi()
if n == 2:
	print(2)
	exit()
print(1)


print('12'[int(input()) == 2])


def main():
	v = int(input())
	if v <= 2:
		print(v)
		return
	print(1)
main()


n = int(input())
if n <= 2:
	print(n)
elif n >= 3:
	print(1)


num = int(input())
while True:
	if num == 1 or num % (num - 1) == 0:
		print(num)
		break
	else:
		num -= num - 1


a = int(input())
if a != 2 and a != 0:
	print(1)
else:
	print(a)


from sys import stdin, stdout
import bisect
import math

def st():
	return list(stdin.readline().strip())

def inp():
	return int(stdin.readline())

def li():
	return list(map(int, stdin.readline().split()))

def mp():
	return map(int, stdin.readline().split())

def pr(n):
	stdout.write(str(n) + '\n')

def soe(limit):
	l = [1] * (limit + 1)
	prime = []
	for i in range(2, limit + 1):
		if l[i]:
			for j in range(i * i, limit + 1, i):
				l[j] = 0
	for i in range(2, limit + 1):
		if l[i]:
			prime.append(i)
	return prime

def segsoe(low, high):
	limit = int(high ** 0.5) + 1
	prime = soe(limit)
	n = high - low + 1
	l = [0] * (n + 1)
	for i in range(len(prime)):
		lowlimit = low // prime[i] * prime[i]
		if lowlimit < low:
			lowlimit += prime[i]
		if lowlimit == prime[i]:
			lowlimit += prime[i]
		for j in range(lowlimit, high + 1, prime[i]):
			l[j - low] = 1
	for i in range(low, high + 1):
		if not l[i - low]:
			if i != 1:
				print(i)

def power(a, n):
	r = 1
	while n:
		if n & 1:
			r = r * a
		a *= a
		n = n >> 1
	return r

def solve():
	n = inp()
	if n <= 2:
		print(n)
	else:
		print(1)
for _ in range(1):
	solve()


from sys import stdin, stdout
from math import sin, tan, cos, pi, atan2, sqrt, acos, atan, factorial
from random import randint
n = int(stdin.readline())
if n == 2:
	stdout.write(str(n))
else:
	stdout.write(str('1'))


import collections, atexit, math, sys, bisect
sys.setrecursionlimit(1000000)

def getIntList():
	return list(map(int, input().split()))
try:
	import numpy

	def dprint(*args, **kwargs):
		print(*args, file=sys.stderr)
	dprint('debug mode')
except Exception:

	def dprint(*args, **kwargs):
		pass
inId = 0
outId = 0
if inId > 0:
	dprint('use input', inId)
	sys.stdin = open('input' + str(inId) + '.txt', 'r')
if outId > 0:
	dprint('use output', outId)
	sys.stdout = open('stdout' + str(outId) + '.txt', 'w')
	atexit.register(lambda : sys.stdout.close())
(N,) = getIntList()
if N == 2:
	print(2)
else:
	print(1)


def play(v):
	if v > 2:
		return 1
	else:
		return v
input = int(input())
print(play(input))


from sys import stdin, stdout
import cProfile, math
from collections import Counter
from bisect import bisect_left, bisect, bisect_right
import itertools
from copy import deepcopy
from fractions import Fraction
import sys, threading
sys.setrecursionlimit(10 ** 6)
threading.stack_size(2 ** 27)
printHeap = str()
memory_constrained = False
P = 10 ** 9 + 7
import sys
sys.setrecursionlimit(10000000)

class Operation:

	def __init__(self, name, function, function_on_equal, neutral_value=0):
		self.name = name
		self.f = function
		self.f_on_equal = function_on_equal

def add_multiple(x, count):
	return x * count

def min_multiple(x, count):
	return x

def max_multiple(x, count):
	return x
sum_operation = Operation('sum', sum, add_multiple, 0)
min_operation = Operation('min', min, min_multiple, 1000000000.0)
max_operation = Operation('max', max, max_multiple, -1000000000.0)

class SegmentTree:

	def __init__(self, array, operations=[sum_operation, min_operation, max_operation]):
		self.array = array
		if type(operations) != list:
			raise TypeError('operations must be a list')
		self.operations = {}
		for op in operations:
			self.operations[op.name] = op
		self.root = SegmentTreeNode(0, len(array) - 1, self)

	def query(self, start, end, operation_name):
		if self.operations.get(operation_name) == None:
			raise Exception('This operation is not available')
		return self.root._query(start, end, self.operations[operation_name])

	def summary(self):
		return self.root.values

	def update(self, position, value):
		self.root._update(position, value)

	def update_range(self, start, end, value):
		self.root._update_range(start, end, value)

	def __repr__(self):
		return self.root.__repr__()

class SegmentTreeNode:

	def __init__(self, start, end, segment_tree):
		self.range = (start, end)
		self.parent_tree = segment_tree
		self.range_value = None
		self.values = {}
		self.left = None
		self.right = None
		if start == end:
			self._sync()
			return
		self.left = SegmentTreeNode(start, start + (end - start) // 2, segment_tree)
		self.right = SegmentTreeNode(start + (end - start) // 2 + 1, end, segment_tree)
		self._sync()

	def _query(self, start, end, operation):
		if end < self.range[0] or start > self.range[1]:
			return None
		if start <= self.range[0] and self.range[1] <= end:
			return self.values[operation.name]
		self._push()
		left_res = self.left._query(start, end, operation) if self.left else None
		right_res = self.right._query(start, end, operation) if self.right else None
		if left_res is None:
			return right_res
		if right_res is None:
			return left_res
		return operation.f([left_res, right_res])

	def _update(self, position, value):
		if position < self.range[0] or position > self.range[1]:
			return
		if position == self.range[0] and self.range[1] == position:
			self.parent_tree.array[position] = value
			self._sync()
			return
		self._push()
		self.left._update(position, value)
		self.right._update(position, value)
		self._sync()

	def _update_range(self, start, end, value):
		if end < self.range[0] or start > self.range[1]:
			return
		if start <= self.range[0] and self.range[1] <= end:
			self.range_value = value
			self._sync()
			return
		self._push()
		self.left._update_range(start, end, value)
		self.right._update_range(start, end, value)
		self._sync()

	def _sync(self):
		if self.range[0] == self.range[1]:
			for op in self.parent_tree.operations.values():
				current_value = self.parent_tree.array[self.range[0]]
				if self.range_value is not None:
					current_value = self.range_value
				self.values[op.name] = op.f([current_value])
		else:
			for op in self.parent_tree.operations.values():
				result = op.f([self.left.values[op.name], self.right.values[op.name]])
				if self.range_value is not None:
					bound_length = self.range[1] - self.range[0] + 1
					result = op.f_on_equal(self.range_value, bound_length)
				self.values[op.name] = result

	def _push(self):
		if self.range_value is None:
			return
		if self.left:
			self.left.range_value = self.range_value
			self.right.range_value = self.range_value
			self.left._sync()
			self.right._sync()
			self.range_value = None

	def __repr__(self):
		ans = '({}, {}): {}\n'.format(self.range[0], self.range[1], self.values)
		if self.left:
			ans += self.left.__repr__()
		if self.right:
			ans += self.right.__repr__()
		return ans

def display(string_to_print):
	stdout.write(str(string_to_print) + '\n')

def primeFactors(n):
	factors = dict()
	for i in range(2, math.ceil(math.sqrt(n)) + 1):
		while n % i == 0:
			if i in factors:
				factors[i] += 1
			else:
				factors[i] = 1
			n = n // i
	if n > 2:
		factors[n] = 1
	return factors

def isprime(n):
	if n < 4:
		return True
	if n % 2 == 0:
		return False
	if n % 3 == 0:
		return False
	i = 5
	w = 2
	while i * i <= n:
		if n % i == 0:
			return False
		i += w
		w = 6 - w
	return True

def test_print(*args):
	if testingMode:
		print(args)

def display_list(list1, sep=' '):
	stdout.write(sep.join(map(str, list1)) + '\n')

def get_int():
	return int(stdin.readline().strip())

def get_tuple():
	return map(int, stdin.readline().split())

def get_list():
	return list(map(int, stdin.readline().split()))
memory = dict()

def clear_cache():
	global memory
	memory = dict()

def cached_fn(fn, *args):
	global memory
	if args in memory:
		return memory[args]
	else:
		result = fn(*args)
		memory[args] = result
		return result
TestCases = False
testingMode = False
optimiseForReccursion = False

def main():
	n = get_int()
	print(1) if n != 2 else print(2)
if TestCases:
	for _ in range(get_int()):
		cProfile.run('main()') if testingMode else main()
else:
	(cProfile.run('main()') if testingMode else main()) if not optimiseForReccursion else threading.Thread(target=main).start()


v = int(input())
n = v
c = 0
if v == 1:
	print('1')
	exit()
elif v == 2:
	print('2')
	exit()
else:
	for x in range(v, 0, -1):
		if x % v != 0:
			c = x
			break
print(n - c)


n = int(input())
while 1:
	o = 0
	for i in range(n - 1, 0, -1):
		if n % i != 0:
			n = n - i
			break
		else:
			o += 1
	if n == 1 or o == n - 1:
		break
print(n)


def mi():
	return map(int, input().split())
n = int(input())
if n <= 2:
	print(n)
else:
	print(1)


def obtener_minimo(inicial):
	if inicial == 1 or inicial == 2:
		return inicial
	else:
		return inicial - (inicial - 1)
inicial = int(input())
print(obtener_minimo(inicial))


from sys import stdin, stdout
from math import *
from heapq import *
from collections import *

def main():
	n = int(stdin.readline())
	res = 1
	if n == 2:
		res = 2
	stdout.write(str(res))
	return 0
main()


def solution(n):
	if n == 2:
		return 2
	else:
		return 1

def answer():
	n = int(input())
	print(solution(n))
answer()


u = int(input())
if u == 2:
	print(2)
else:
	print(1)


u = eval(input())
if u == 2:
	print(2)
else:
	print(1)


n = int(input())
while n > 1:
	if n == 2:
		break
	if n % 2 == 0:
		x = n / 2 - 1
	else:
		x = n - 1
	n = n - x
print(int(n))


n = int(input())
c = 1
while c != 0:
	x = 0
	for i in range(n - 1, 1, -1):
		if n % i != 0:
			n -= i
			x = 1
			break
	if x == 0:
		c = 0
print(n)


n = int(input())
while n > 1:
	start = n - 1
	if start <= 1:
		break
	if n % start == 0:
		start -= 1
	else:
		n -= start
print(n)


(x,) = map(int, input().split())
if x == 2:
	print(2)
else:
	print(1)


import sys
input = sys.stdin.readline
n = int(input())
if n < 3:
	print(n)
else:
	print(1)


print(1 if int(input()) is not 2 else 2)


from sys import stdin
n = int(stdin.readline().strip())
if n != 2:
	print(1)
else:
	print(2)


num = int(input())
if num == 2:
	print(2)
else:
	print(1)


import sys
import math
import bisect

def main():
	n = int(input())
	if n == 1:
		print(1)
	elif n == 2:
		print(2)
	else:
		print(1)
main()


import sys
import math
fileoperation = 0
if fileoperation:
	orig_stdout = sys.stdout
	orig_stdin = sys.stdin
	inputfile = open('W:/Competitive Programming/input.txt', 'r')
	outputfile = open('W:/Competitive Programming/output.txt', 'w')
	sys.stdin = inputfile
	sys.stdout = outputfile
mod = 1000000007

def nospace(l):
	ans = ''.join((str(i) for i in l))
	return ans
t = int(input())
if t == 2:
	print(2)
else:
	print(1)
if fileoperation:
	sys.stdout = orig_stdout
	sys.stdin = orig_stdin
	inputfile.close()
	outputfile.close()


print(1 + (int(input()) == 2))


from math import *
n = int(input())
if n == 2:
	print(2)
else:
	print(1)


import collections
from math import log
import sys

def check(input):
	if input == 2:
		return 2
	return 1
print(check(int(sys.stdin.readline())))


if input() == '2':
	print(2)
	exit()
print(1)


v = int(input())
n = v
if n == 1:
	print(1)
elif n == 2:
	print(2)
else:
	print(1)


import math, itertools, fractions, heapq, collections, bisect, sys, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	n = I()
	if n == 2:
		return 2
	return 1
print(main())


import os
import sys
from collections import deque
import pdb
import heapq
from heapq import *
from pprint import pprint
from bisect import *
from math import *
sys.setrecursionlimit(999999999)
if os.getcwd() == 'C:\\Users\\User\\Desktop\\python\\Prog':
	pdb = pdb.Pdb(stdin=sys.stdin, stdout=sys.stdout)
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def rI():
	return [int(i) for i in input().split()]
n = rI()[0]
if n <= 2:
	print(n)
else:
	print(1)


print((lambda x: 1 if not x == 2 else 2)(int(input())))


try:
	n = int(input())
	if n == 2:
		print(2)
	else:
		print(1)
except:
	pass


rawint = input()
if len(rawint) > 1:
	print(1)
elif len(rawint) == 1:
	a = int(rawint)
	if a == 2:
		print(2)
	else:
		print(1)


number = int(input())
if number == 2:
	print(2)
else:
	print(1)
quit()