There is a legend in the IT City college. A student that failed to answer all questions on the game theory exam is given one more chance by his professor. The student has to play a game with the professor.

The game is played on a square field consisting of n × n cells. Initially all cells are empty. On each turn a player chooses and paint an empty cell that has no common sides with previously painted cells. Adjacent corner of painted cells is allowed. On the next turn another player does the same, then the first one and so on. The player with no cells to paint on his turn loses.

The professor have chosen the field size n and allowed the student to choose to be the first or the second player in the game. What should the student choose to win the game? Both players play optimally.


-----Input-----

The only line of the input contains one integer n (1 ≤ n ≤ 10^18) — the size of the field.


-----Output-----

Output number 1, if the player making the first turn wins when both players play optimally, otherwise print number 2.


-----Examples-----
Input
1

Output
1
Input
2

Output
2

Difficulty: interview

Starter code:

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

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


n = int(input());
k = n*n;
if(k % 2 == 0):
    print(2)
elif(k % 2 != 0):
    print(1)

print(2 - int(input())  %2)


import sys
def fact(n):
	ret = 1
	for x in range(1, n + 1):
		ret = ret * x
	return ret

def C(n, k):
	return fact(n) // (fact(k) * (fact(n - k)))
n = int(input())
if n % 2 == 1:
	print(1)
else:
	print(2)

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

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


n = int(input())
print(2 - n % 2)

print(1 if int(input()) % 2 == 1 else 2)


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

import sys

def c5(n):
    return n * (n - 1) * (n - 2) * (n - 3) * (n - 4) // 2 // 3 // 4 // 5

def c6(n):
    return c5(n) * (n - 5) // 6

def c7(n):
    return c6(n) * (n - 6) // 7

n = int(input())

print(1 if n % 2 else 2)

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

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


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


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


n = int(input())
s = ((n + 1) // 2)**2 + (n // 2)**2
if s % 2 == 1:
    print("1")
else:
    print("2")


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

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

x = int(input()) % 2
if x == 0:
    x = 2
print(x)

import re, sys, string, operator, functools, fractions, collections
sys.setrecursionlimit(10**7)
dX= [-1, 1, 0, 0,-1, 1,-1, 1]
dY= [ 0, 0,-1, 1, 1,-1,-1, 1]
RI=lambda x=' ': list(map(int,input().split(x)))
RS=lambda x=' ': input().rstrip().split(x)
mod=int(1e9+7)
eps=1e-6
#################################################
n=RI()[0]
print(2-(n&1))






n = int(input())
ans = 1 if n % 2 else 2
print(ans)


n = int(input())
ans = n % 2
if ans == 0:
    ans = 2
print(ans)

from functools import reduce
from math import factorial
n = int(input())
print((n-1)%2 + 1)


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

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