The last stage of Football World Cup is played using the play-off system.

There are n teams left in this stage, they are enumerated from 1 to n. Several rounds are held, in each round the remaining teams are sorted in the order of their ids, then the first in this order plays with the second, the third — with the fourth, the fifth — with the sixth, and so on. It is guaranteed that in each round there is even number of teams. The winner of each game advances to the next round, the loser is eliminated from the tournament, there are no draws. In the last round there is the only game with two remaining teams: the round is called the Final, the winner is called the champion, and the tournament is over.

Arkady wants his two favorite teams to play in the Final. Unfortunately, the team ids are already determined, and it may happen that it is impossible for teams to meet in the Final, because they are to meet in some earlier stage, if they are strong enough. Determine, in which round the teams with ids a and b can meet.


-----Input-----

The only line contains three integers n, a and b (2 ≤ n ≤ 256, 1 ≤ a, b ≤ n) — the total number of teams, and the ids of the teams that Arkady is interested in. 

It is guaranteed that n is such that in each round an even number of team advance, and that a and b are not equal.


-----Output-----

In the only line print "Final!" (without quotes), if teams a and b can meet in the Final.

Otherwise, print a single integer — the number of the round in which teams a and b can meet. The round are enumerated from 1.


-----Examples-----
Input
4 1 2

Output
1

Input
8 2 6

Output
Final!

Input
8 7 5

Output
2



-----Note-----

In the first example teams 1 and 2 meet in the first round.

In the second example teams 2 and 6 can only meet in the third round, which is the Final, if they win all their opponents in earlier rounds.

In the third example the teams with ids 7 and 5 can meet in the second round, if they win their opponents in the first round.

Source: codeforces | Difficulty: EASY
Tags: Implementation

Constructive algorithms


Solutions:
(n, a, b) = map(int, input().split())
l = 0
p = 1
while 2 * p <= n:
	p *= 2
	l += 1
cnt = 0
while a != b:
	cnt += 1
	a = (a + 1) // 2
	b = (b + 1) // 2
if cnt == l:
	print('Final!')
else:
	print(cnt)


import math
(n, a, b) = map(int, input().split())
for i in range(1, 8):
	a = math.ceil(a / 2)
	b = math.ceil(b / 2)
	if a == b:
		print([i, 'Final!'][2 ** i == n])
		exit(0)
print('Final!')


(n, a, b) = map(int, input().split())
a -= 1
b -= 1
n = len(bin(n)) - 3
i = 0
while a != b:
	a >>= 1
	b >>= 1
	i += 1
print('Final!' if i == n else i)


import random
(n, a, b) = map(int, input().split())
commands = []
[commands.append(i) for i in range(1, n + 1)]
processing = True
k = 1
cr = commands
while processing:
	r = []
	for i in range(0, len(cr), 2):
		c = cr[i:i + 2]
		if a in c and b in c:
			processing = False
			break
		elif a in c:
			r.append(a)
		elif b in c:
			r.append(b)
		else:
			r.append(c[0])
	if processing:
		cr = r
		k += 1
	if len(cr) == 2:
		break
if len(cr) == 2:
	print('Final!')
else:
	print(k)


import math
(n, a, b) = map(int, input().split())
i = 2
(a, b) = (min(a, b), max(a, b))
while True:
	if a <= n // i < b:
		break
	if a > n // i:
		a -= n // i
		b -= n // i
	i *= 2
ans = math.log(n, 2) - math.log(i, 2) + 1
if math.log(i, 2) == 1:
	print('Final!')
else:
	print(int(ans))


import math
(n, a, b) = [int(x) for x in input().split()]
a = a - 1
b = b - 1
d = round(math.log(n, 2))
for i in range(d):
	a = int(a / 2)
	b = int(b / 2)
	if a == b and i != d - 1:
		print(i + 1)
		break
	elif a == b:
		print('Final!')
		break


inp = input().split(' ')
(n, a, b) = (int(inp[0]), int(inp[1]), int(inp[2]))
(a, b) = (min(a, b) - 1, max(a, b) - 1)
(rnd, res) = (0, -1)
while n > 1:
	k = n // 2
	rnd += 1
	if a < k and b >= k and (res == -1):
		res = rnd
	(n, a, b) = (k, a % k, b % k)
if res == 1:
	print('Final!')
else:
	print(rnd - res + 1)


import math

def read():
	return [int(v) for v in input().split()]

def solve(l, n):
	q = 2
	r = []
	l -= 1
	while q <= n:
		r.append(l // q)
		q *= 2
	return r

def main():
	(n, a, b) = read()
	(a1, b1) = (solve(a, n), solve(b, n))
	for i in range(len(a1)):
		if a1[i] == b1[i]:
			if i == len(a1) - 1:
				print('Final!')
			else:
				print(i + 1)
			return
main()


(n, a, b) = map(int, input().split())
count = 1
a = a + a % 2
b = b + b % 2
while a != b:
	a //= 2
	b //= 2
	a += a % 2
	b += b % 2
	count += 1
if 2 ** count == n:
	print('Final!')
else:
	print(count)


import math
(n, a, b) = map(int, input().split(' '))
round = 0
while a != b:
	a = int((a + 1) / 2)
	b = int((b + 1) / 2)
	round += 1
if 1 << round == n:
	print('Final!')
else:
	print(round)


import sys

def solve(n, a, b):
	k = 0
	while a != b:
		k += 1
		a = (a + 1) // 2
		b = (b + 1) // 2
	return 'Final!' if 2 ** k == n else k
line = sys.stdin.readline()
(n, a, b) = [int(v) for v in line.split(' ')]
res = solve(n, a, b)
print(res)


import math
(n, a, b) = map(int, input().split())
k = int(math.log(n, 2))
r = 0
for i in range(k):
	if a % 2 != 0:
		a += 1
	if b % 2 != 0:
		b += 1
	a = a // 2
	b = b // 2
	r += 1
	if a == b:
		break
if r == k:
	print('Final!')
else:
	print(r)


import math

def calc_round_number(number_of_teams, total_number):
	return int(math.log2(total_number / number_of_teams)) + 1

def is_final(number_of_teams, round_number):
	return int(math.log2(number_of_teams)) == round_number

def get_pairs(teams):
	teams_sorted = sorted(teams)
	pairs = [(x, y) for (x, y) in zip(teams_sorted[:-1:2], teams_sorted[1::2])]
	return pairs

def get_winners(pair, a, b):
	(x, y) = pair
	if x in (a, b):
		return x
	else:
		return y

def get_round_number(teams, a, b, n):
	pairs = get_pairs(teams)
	result = [True for (x, y) in pairs if x == a and y == b or (y == a and x == b)]
	if result:
		return calc_round_number(len(teams), n)
	else:
		winners = [get_winners(pair, a, b) for pair in pairs]
		return get_round_number(list(winners), a, b, n)

def main():
	user_input = input()
	(n, a, b) = list(map(int, user_input.split()))
	teams = list(range(1, n + 1))
	round_number = get_round_number(teams, a, b, n)
	if is_final(n, round_number):
		result = 'Final!'
	else:
		result = '{}'.format(round_number)
	print(result)
main()


(n, a, b) = map(int, input().split())
(a, b) = (min(a, b), max(a, b))
i = 1
st = 1
while 2 ** st != n:
	st += 1
(l, r) = (0, n)
while True:
	m = (l + r) // 2
	if a <= m and b > m:
		if i == 1:
			print('Final!')
		else:
			print(st - i + 1)
		break
	elif m > a:
		r = m
	else:
		l = m
	i += 1


def check(n, a, b):
	c = n / 2
	if b > c and a <= c or (a > c and b <= c):
		return n
	else:
		if a <= c and b <= c:
			z = check(c, a, b)
		if a > c and b > c:
			z = check(c, a - c, b - c)
	return z
(n, a, b) = map(int, input().split())
z = check(n, a, b)
i = 0
if z == n:
	print('Final!')
else:
	while z != 1:
		z /= 2
		i += 1
	print(i)


import sys
import itertools as it
import math
(n, a, b) = map(int, sys.stdin.readline().split())
a -= 1
b -= 1
logn = int(math.log2(n))
for k in range(logn):
	if a & 1 << logn - k - 1 != b & 1 << logn - k - 1:
		if k == 0:
			print('Final!')
		else:
			print(logn - k)
		break


(n, a, b) = map(int, input().split())
c = 0
a -= 1
b -= 1
while a != b:
	a //= 2
	b //= 2
	c += 1
if 2 ** c == n:
	print('Final!')
else:
	print(c)


(n, a, b) = map(int, input().split())
(a, b) = sorted([a, b])
l = [*range(1, n + 1)]
res = 1
while l:
	for i in range(len(l) // 2):
		if l[i] == a and l[i + 1] == b:
			print(res if len(l) != 2 else 'Final!')
			exit()
		if l[i] == a or l[i] == b:
			del l[i + 1]
		else:
			del l[i]
	res += 1
print(res)


(n, a, b) = map(int, input().split())

def f(n, a, b):
	if b > n // 2 and a <= n // 2 or (a > n // 2 and b <= n // 2):
		return 0
	if a > n // 2 and b > n // 2:
		return 1 + f(n // 2, a - n // 2, b - n // 2)
	if a <= n // 2 and b <= n // 2:
		return 1 + f(n // 2, a, b)
deg = 0
raund = f(n, a, b)
while n > 0:
	deg += 1
	n //= 2
if raund == 0:
	print('Final!')
else:
	print(deg - raund - 1)


x = input().split()
x = [int(i) for i in x]
x.sort()
turn = 1
while not (x[0] % 2 == 1 and x[1] % 2 == 0 and (x[1] - x[0] == 1)):
	x[0] = x[0] // 2 + x[0] % 2
	x[1] = x[1] // 2 + x[1] % 2
	turn += 1
count = 1
prod = 2
while prod != x[2]:
	prod = prod * 2
	count += 1
if count == turn:
	print('Final!')
else:
	print(turn)


(a, b, c) = map(int, input().split())
cnt = 0
b += a - 1
c += a - 1
while b != c:
	b >>= 1
	c >>= 1
	cnt += 1
if b == 1:
	print('Final!')
else:
	print(cnt)


(n, a, b) = map(int, input().split())
r = 1
mx = 2
while 1:
	r1 = (a + mx - 1) // mx
	r2 = (b + mx - 1) // mx
	if r1 == r2:
		if mx == n:
			print('Final!')
		else:
			print(r)
		break
	mx *= 2
	r += 1


(n, a, b) = map(int, input().split())
box = []
for i in range(1, n, 2):
	box.append([i, i + 1])
roun = 1
(a, b) = sorted([a, b])
while True:
	l = len(box)
	f = 0
	i = 0
	while i < l:
		if box[i] == [a, b]:
			if l == 1:
				print('Final!')
			else:
				print(roun)
			f = 1
			break
		if a in box[i]:
			if b in box[i + 1]:
				if l == 2:
					print('Final!')
				else:
					print(roun + 1)
				f = 1
				break
			box.append([a, box[i + 1][0]])
			i += 2
		elif box[i + 1] == [a, b]:
			print(roun)
			f = 1
			break
		elif a in box[i + 1]:
			box.append([a, box[i][0]])
			i += 2
		elif b in box[i]:
			box.append([b, box[i + 1][0]])
			i += 2
		elif b in box[i + 1]:
			box.append([b, box[i][0]])
			i += 2
		else:
			box.append([box[i][0], box[i + 1][0]])
			i += 2
	if f:
		break
	box = box[l:]
	roun += 1


import sys, math
(n, a, b) = map(int, sys.stdin.readline().split())
a -= 1
b -= 1
ans = 0
flag = True
while n > 2:
	a //= 2
	b //= 2
	ans += 1
	if a == b:
		print(ans)
		flag = False
		break
	n //= 2
if flag:
	print('Final!')


(n, a, b) = [int(x) for x in input().split()]
l1 = [x for x in range(1, n + 1)]
l2 = []
res = 0
found = False
while not found:
	res += 1
	for i in range(0, len(l1), 2):
		if l1[i] in [a, b] and l1[i + 1] in [a, b]:
			found = True
			if len(l1) == 2:
				res = 'Final!'
			break
		if l1[i] in [a, b]:
			l2.append(l1[i])
		else:
			l2.append(l1[i + 1])
	l1 = l2
	l2 = []
print(res)


(n, a, b) = map(int, input().split())
flag = 2
a -= 1
b -= 1
i = 1
while flag < n:
	if a // flag == b // flag:
		print(i)
		break
	i += 1
	flag *= 2
else:
	print('Final!')


import sys
(n, a, b) = (int(x) for x in input().split())
if a > b:
	(a, b) = (b, a)
r = 0
for i in range(1, 9):
	if 2 ** i == n:
		r = i
		break
for j in range(1, 9):
	len = 2 ** j
	if j == r:
		print('Final!')
		sys.exit()
	for i in range(1, n + 1, len):
		if a >= i and a < i + len and (b >= i) and (b < i + len):
			print(j)
			sys.exit()


from sys import stdin, stdout
nmbr = lambda : int(stdin.readline())
lst = lambda : list(map(int, stdin.readline().split()))
for _ in range(1):
	(n, a, b) = lst()
	t = [i for i in range(1, n + 1)]
	ans = 1
	f = 0
	while 1:
		new = []
		for i in range(0, len(t), 2):
			if t[i] in [a, b] and t[i + 1] in [a, b]:
				f = 1
				break
			elif t[i] in [a, b] and t[i + 1] not in [a, b]:
				new += [t[i]]
			elif t[i] not in [a, b] and t[i + 1] in [a, b]:
				new += [t[i + 1]]
			else:
				new += [t[i]]
		if f:
			break
		t = new.copy()
		ans += 1
	print('Final!' if len(t) == 2 else ans)


(n, a, b) = map(int, input().split())
a -= 1
b -= 1
ans = 0
while True:
	a //= 2
	b //= 2
	ans += 1
	if a == b:
		if n == 2:
			print('Final!')
		else:
			print(ans)
		break
	n //= 2


import sys
(n, a, b) = map(int, input().split())
cnt = 0
l = [set([x]) for x in range(1, n + 1)]
while 1:
	l = list(map(lambda tup: tup[0] | tup[1], zip(l[::2], l[1::2])))
	cnt += 1
	for el in l:
		if a in el and b in el:
			print(cnt if len(el) < n else 'Final!')
			sys.exit(0)


from math import log2

def bin_(x):
	l_ = ln
	return str(bin(x))[2:].zfill(l_)
(n, a, b) = map(int, input().split())
ln = int(log2(n)) + 1
(a_, b_) = (bin_(a - 1), bin_(b - 1))
for i in range(ln):
	if a_[i] != b_[i]:
		ans = i
		break
else:
	ans = 0
print((ln - ans, 'Final!')[(ln - ans) % (ln - 1) == 0])


def main():
	(n, a, b) = [int(x) for x in input().split()]
	r = 0
	a -= 1
	b -= 1
	while a != b:
		a >>= 1
		b >>= 1
		r += 1
	if 2 ** r == n:
		print('Final!')
	else:
		print(r)
main()


(n, a, b) = map(int, input().split())
l = list(range(1, n + 1))

def getRoundNumber(l, n, a, b, count):
	if len(l) == 2:
		return 1000
	temp = []
	for i in range(0, len(l) - 1, 2):
		if l[i] == a and l[i + 1] == b:
			return count
		elif l[i] == a and l[i + 1] != a:
			temp.append(l[i])
		elif l[i] != a and l[i + 1] == a:
			temp.append(l[i + 1])
		elif l[i] != b and l[i + 1] == b:
			temp.append(l[i + 1])
		elif l[i] == b and l[i + 1] != b:
			temp.append(l[i])
		else:
			temp.append(l[i])
	n = n // 2
	return getRoundNumber(temp, n, a, b, count + 1)
if a > b:
	count = getRoundNumber(l, n, b, a, 1)
	if count == 1000:
		print('Final!')
	else:
		print(count)
else:
	count = getRoundNumber(l, n, a, b, 1)
	if count == 1000:
		print('Final!')
	else:
		print(count)


from math import log2 as ln
(n, a, b) = [int(i) for i in input().split(' ')]
(a, b) = sorted([a, b])
fn = ln(n)
l = [i for i in range(1, n + 1)]
ans = 0
t = 0
for _ in range(10):
	m = []
	if len(l) == 0:
		break
	ans += 1
	for i in range(0, len(l) - 1, 2):
		if [l[i], l[i + 1]] == [a, b]:
			t = 1
			break
		elif l[i] == a:
			m.append(a)
		elif l[i] == b:
			m.append(b)
		elif l[i + 1] == a:
			m.append(a)
		elif l[i + 1] == b:
			m.append(b)
		else:
			m.append(l[i])
	if t == 1:
		break
	l = m.copy()
if ans == fn:
	print('Final!')
else:
	print(ans)


import math

def powerTwo(n):
	power = 0
	while math.pow(2, power) != n:
		power += 1
	return power
(n, a, b) = map(int, input().split())
rounds = 0
while a != b:
	if a % 2 != 0:
		a += 1
	if b % 2 != 0:
		b += 1
	rounds += 1
	a //= 2
	b //= 2
if rounds == powerTwo(n):
	print('Final!')
else:
	print(rounds)


import math
(num, one, two) = [int(x) for x in input().split()]
stage = num / 2
if one <= stage and two > stage or (one > stage and two <= stage):
	print('Final!')
else:
	count = 1
	while stage >= 2:
		if math.ceil(one / 2) == math.ceil(two / 2):
			print(count)
			break
		else:
			count += 1
			one = math.ceil(one / 2)
			two = math.ceil(two / 2)
			stage = stage / 2


from math import log2 as lg

def f(n, a, b, l, u):
	if n <= 1:
		return
	if a >= l and a <= n // 2 + l - 1 and (b >= n // 2 + l) and (b <= u):
		if n == final:
			print('Final!')
		else:
			print(int(lg(n)))
	elif b <= n // 2 + l - 1:
		f(n // 2, a, b, l, n // 2 + l - 1)
	else:
		f(n // 2, a, b, n // 2 + l, u)
(n, a, b) = map(int, input().split())
final = n
if a > b:
	(a, b) = (b, a)
f(n, a, b, 1, n)


t = input().split()
n = int(t[0])
a = int(t[1])
b = int(t[2])
i = n
k = 0
while i > 0:
	k = k + 1
	i = i // 2
k = k - 1
x = k
if a < b:
	i = n // 2
	j = i
	while i > 0:
		if a <= j and b > j:
			break
		elif a <= j and b <= j:
			j = j - i // 2
		else:
			j = j + i // 2
		x = x - 1
		i = i // 2
	if x == k:
		print('Final!')
	else:
		print(x)
else:
	i = n // 2
	j = i
	while i > 0:
		if b <= j and a > j:
			break
		elif a <= j and b <= j:
			j = j - i // 2
		else:
			j = j + i // 2
		x = x - 1
		i = i // 2
	if x == k:
		print('Final!')
	else:
		print(x)


import math
(n, a, b) = [int(el) for el in input().split()]
m = int(math.log(n, 2))
for i in range(1, m + 1):
	if (a - 1) // 2 ** i == (b - 1) // 2 ** i:
		if i == m:
			print('Final!')
		else:
			print(i)
		break


from math import log, ceil
(n, a, b) = map(int, input().split())
round_ = 1
final = log(n, 2)
(a, b) = (min(a, b), max(a, b))
while abs(a - b) != 1 or (a % 2 == 0 and b % 2 == 1):
	a = ceil(a / 2)
	b = ceil(b / 2)
	round_ += 1
if round_ == final:
	print('Final!')
else:
	print(round_)


from collections import deque
import math
(n, a, b) = map(int, input().split())
teams = [x for x in range(1, n + 1)]
round = 1
good = True
while len(teams) > 2 and good:
	temp = []
	for i in range(0, len(teams), 2):
		t1 = teams[i]
		t2 = teams[i + 1]
		if t1 == a and t2 == b or (t1 == b and t2 == a):
			good = False
			break
		elif t1 == a or t1 == b:
			temp.append(t1)
		elif t2 == a or t2 == b:
			temp.append(t2)
		else:
			temp.append(t1)
	teams = temp
	if good:
		round += 1
print('Final!' if round == math.log2(n) else round)


import math

def rec(a, b, count):
	if a // 2 == b // 2:
		return count
	else:
		return rec(a // 2, b // 2, count + 1)
(n, a, b) = input().split()
res = rec(int(a) - 1, int(b) - 1, 1)
if res == math.log2(int(n)):
	print('Final!')
else:
	print(res)


(n, a, b) = map(int, input().split())
t = 1
mx = 2
while 1:
	t1 = (a + mx - 1) // mx
	t2 = (b + mx - 1) // mx
	if t1 == t2:
		if mx == n:
			print('Final!')
		else:
			print(t)
		break
	mx *= 2
	t += 1


import os.path
import sys
from math import *
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def inp():
	return sys.stdin.readline().strip()
(n, a, b) = map(int, inp().split())
a -= 1
b -= 1
match = 0
while a != b:
	a //= 2
	b //= 2
	match += 1
if 1 << match == n:
	print('Final!')
else:
	print(match)


(n, a, b) = map(int, input().split())
ca = a - 1
cb = b - 1
cx = n // 2
res = 0
while cx:
	if ca == cb:
		print(res)
		exit()
	ca //= 2
	cb //= 2
	cx //= 2
	res += 1
print('Final!')


(a, b, c) = map(int, input().split(' '))
pwr = 0
while a != 1:
	pwr += 1
	a = a // 2
ans = 1
for j in range(1, pwr):
	if (b - 1) // 2 ** j != (c - 1) // 2 ** j:
		ans += 1
if ans == pwr:
	print('Final!')
else:
	print(ans)


(n, a, b) = [int(s) for s in input().split()]
a -= 1
b -= 1
l = 0
while a != b:
	l -= -1
	a //= 2
	b //= 2
print(l if 2 ** l != n else 'Final!')


(n, a, b) = map(int, input().split())
round = 0
temp = n
while temp > 1:
	round += 1
	temp //= 2
max_round = round
if a > b:
	(a, b) = (b, a)
mid = n // 2
while round > 1:
	if a <= mid and b > mid:
		break
	round -= 1
	n //= 2
	mid += n // 2 if mid <= a else -n // 2
print('Final!' if round == max_round else round)


def f(n, aim):
	xs = [x for x in range(1, n + 1)]
	rn = 1
	while len(xs) > 2:
		new_xs = []
		for i in range(len(xs) // 2):
			(f, l) = (xs[2 * i], xs[2 * i + 1])
			if f in aim and l in aim:
				return rn
			new_xs.append(f if f in aim else l)
		xs = new_xs
		rn += 1
	return 'Final!'
(n, a, b) = [int(x) for x in input().split()]
print(f(n, [a, b]))


(n, a, b) = map(int, input().strip().split())
if a > b:
	(a, b) = (b, a)
r = 1
t = [i + 1 for i in range(n)]
while True:
	s = list()
	for i in range(0, len(t), 2):
		if t[i] == a and t[i + 1] == b:
			if len(t) == 2:
				print('Final!')
			else:
				print(r)
			exit(0)
		elif t[i] == a or t[i + 1] == a:
			s.append(a)
		elif t[i] == b or t[i + 1] == b:
			s.append(b)
		else:
			s.append(t[i])
	t = s
	r += 1


(n, a, b) = map(int, input().split())
power = 1
while 2 ** power < n:
	power += 1
(a, b) = (min(a, b), max(a, b))
n1 = a - 1
n2 = b - a - 1
n3 = n - b
round_num = 0
while n2 > 0 or (n1 > 0 and n1 % 2 == 1):
	round_num += 1
	if n1 % 2 == 1:
		n1 //= 2
	else:
		n1 //= 2
		n2 -= 1
	if n3 % 2 == 1:
		n3 //= 2
	else:
		n3 //= 2
		n2 -= 1
	n2 //= 2
print('Final!' if power == round_num + 1 else round_num + 1)


(n, a, b) = map(int, input().split())
if a > b:
	temp = a
	a = b
	b = temp
a = a - 1
b = b - 1
h = n / 2
if a < h and b >= h:
	print('Final!')
else:
	c = 0
	round = 1
	while c == 0:
		if a // 2 == b // 2:
			print(round)
			c = 1
		else:
			a = a // 2
			b = b // 2
			round += 1


import math
(n, a, b) = tuple(map(int, input().split()))

def mr(k, n):
	a = [0]
	for i in range(n // k):
		a.extend([i] * k)
	return a
rounds = {r: mr(2 ** r, 258) for r in range(1, 10)}

def sol(a, b):
	for i in range(1, 10):
		if rounds[i][a] == rounds[i][b]:
			return i
	return 0
a = sol(a, b)
print(a if a != int(math.log(n, 2)) else 'Final!')


(a, b, c) = map(int, input().split())
z = [*range(1, a + 1)]
(b, c) = sorted([b, c])
s = 0
k = a
while 1:
	p = []
	for i in range(0, k, 2):
		if z[i] == b and z[i + 1] == c:
			s += 1
			if len(z) == 2:
				print('Final!')
			else:
				print(s)
			exit()
		elif z[i] == b:
			p += [z[i]]
		elif z[i + 1] == b:
			p += [z[i + 1]]
		elif z[i] == c:
			p += [z[i]]
		elif z[i + 1] == c:
			p += [z[i + 1]]
		else:
			p += [z[i]]
	k //= 2
	z = p
	s += 1


(n, a, b) = map(int, input().split())
(a, b) = (min(a, b), max(a, b))
l = 1
r = n
p = 1
f = 0
while p < n:
	p *= 2
	f += 1
cur = 0
while l < r:
	m = (l + r) // 2
	if l <= a <= m and m < b <= r:
		break
	if b <= m:
		r = m
	else:
		l = m + 1
	cur += 1
if cur == 0:
	print('Final!')
else:
	print(f - cur)


import math
(n, a, b) = map(int, input().split())
lst = [i for i in range(1, n + 1)]
clst = []
f = 0
cnt = 0
found = 0
final = 0
while len(clst) != 1 and len(lst) != 1:
	if len(clst) == 2 or len(lst) == 2:
		final = 1
	if f == 0:
		for i in range(0, n, 2):
			if i + 1 < n:
				if sorted([lst[i], lst[i + 1]]) == sorted([a, b]):
					found = 1
					break
			if lst[i] in [a, b]:
				clst.append(lst[i])
			elif i + 1 < n and lst[i + 1] in [a, b]:
				clst.append(lst[i + 1])
			else:
				clst.append(lst[i])
		f = 1
		lst = []
		n = math.ceil(n / 2)
	else:
		for i in range(0, n, 2):
			if i + 1 < n:
				if sorted([clst[i], clst[i + 1]]) == sorted([a, b]):
					found = 1
					break
			if clst[i] in [a, b]:
				lst.append(clst[i])
			elif i + 1 < n and clst[i + 1] in [a, b]:
				lst.append(clst[i + 1])
			else:
				lst.append(clst[i])
		clst = []
		n = math.ceil(n / 2)
		f = 0
	cnt += 1
	if found == 1:
		break
print(cnt if final == 0 else 'Final!')


(n, a, b) = map(int, input().split())
mas = list(range(1, n + 1))

def pars(mas):
	gas = []
	for i in range(0, len(mas), 2):
		gas.append(mas[i:i + 2])
	return gas
if a % 2 == 0:
	a -= 1
if b % 2 == 0:
	b -= 1
q = 1
while True:
	gas = []
	l = pars(mas)
	for el in l:
		if a in el and b in el:
			if len(l) == 1:
				print('Final!')
				exit(0)
			else:
				print(q)
				exit(0)
		elif a in el:
			gas.append(a)
		elif b in el:
			gas.append(b)
		else:
			gas.append(el[0])
	q += 1
	mas = gas.copy()


def log2(n):
	ret = 1
	p = 2
	while True:
		if p == n:
			break
		p *= 2
		ret += 1
	return ret
(n, a, b) = map(int, input().split())
ans = log2(n)
(inf, sup) = (0, n)
n = inf + sup // 2
if n >= min(a, b) and n < max(a, b):
	ans = 'Final!'
else:
	while True:
		n = (inf + sup) // 2
		if n >= min(a, b) and n < max(a, b):
			break
		else:
			if n >= max(a, b):
				sup = n
			else:
				inf = n
			ans -= 1
print(ans)


import sys
I = sys.stdin.readline
(n, a, b) = map(int, I().split())
rou = 1
while n > 0:
	a -= 1
	b -= 1
	a = int(a / 2) + 1
	b = int(b / 2) + 1
	if a == b:
		if n == 2:
			print('Final!')
		else:
			print(rou)
		break
	rou += 1
	n = n // 2


(n, a, b) = list(map(int, input().split()))
cnt = 1
a += a % 2
b += b % 2
while a != b:
	cnt += 1
	a /= 2
	b /= 2
	a += a % 2
	b += b % 2
if 2 ** cnt == n:
	print('Final!')
else:
	print(cnt)


(n, a, b) = map(int, input().split())
d = bin(a - 1 ^ b - 1)
r = len(d) - d.find('1', 2)
print('Final!' if r == (n - 1).bit_length() else r)


arr = input().split(' ')
n = int(arr[0])
a = int(arr[1])
b = int(arr[2])
a -= 1
b -= 1
ra = a // 2
rb = b // 2
c = 1
while ra != rb:
	ra = ra // 2
	rb = rb // 2
	c += 1
if pow(2, c) == n:
	print('Final!')
else:
	print(c)


(n, a, b) = map(int, input().split())
(a, b) = (min(a, b), max(a, b))
sum = 0
while a != b:
	if n == 2:
		print('Final!')
		break
	a = (a + 1) // 2
	b = (b + 1) // 2
	n = n // 2
	sum += 1
else:
	print(sum)


(n, a, b) = [int(i) for i in input().split()]
final = ''
rount = 0
if a > b:
	if a >= n // 2 + 1 and b <= n / 2:
		final = 'Final!'
elif b >= n // 2 + 1 and a <= n / 2:
	final = 'Final!'
if final == 'Final!':
	print(final)
else:
	while a != b:
		a = a // 2 + a % 2
		b = b // 2 + b % 2
		rount += 1
	print(rount)


from math import log2
(n, a, b) = [int(z) for z in input().split()]
l = int(log2(n))
new = [0] * 256
new[a - 1] = 1
new[b - 1] = 1
cur = []
cnt = 1
while True:
	for i in range(0, len(new) - 1, 2):
		cur.append(new[i] + new[i + 1])
	for i in range(len(cur)):
		if cur[i] == 2:
			if cnt == l:
				print('Final!')
			else:
				print(cnt)
			exit(0)
	cnt += 1
	new = cur
	cur = []


import math
(n, a, b) = input().split()
(n, a, b) = (int(n), int(a), int(b))
a -= 1
b -= 1
a = format(a, '010b')
b = format(b, '010b')
for i in range(len(a)):
	if a[i] != b[i]:
		if len(a) - i == math.log(n, 2):
			print('Final!')
		else:
			print(len(a) - i)
		break


(c, a, b) = input().split()
c = int(c)
level = 0
while c != 1:
	level += 1
	c //= 2
a = int(a) - 1
b = int(b) - 1
roundik = 0
while a != b:
	roundik += 1
	a //= 2
	b //= 2
if roundik == level:
	print('Final!')
else:
	print(roundik)


a = list(map(int, input().split()))
n = a[0]
f = a[1]
s = a[2]
a = []
for i in range(n):
	a.append(i + 1)
count = 0
while len(a) != 2:
	count += 1
	size = len(a)
	index = 0
	temp = []
	for i in range(0, size, 2):
		index += 1
		if a[i] == f and a[i + 1] == s or (a[i] == s and a[i + 1] == f):
			print(count)
			exit()
		elif a[i] == f or a[i] == s:
			temp.append(a[i])
		else:
			temp.append(a[i + 1])
	a = temp
print('Final!')


__author__ = 'RaldenProg'
(n, a, b) = [_ for _ in map(int, input().split())]
komands = []
delete = []
chet = 0
stop = 0
for i in range(1, n + 1):
	komands.append(i)
while len(komands) != 2:
	chet += 1
	delete = []
	for i in range(0, len(komands), 2):
		if komands[i] == a and komands[i + 1] == b or (komands[i] == b and komands[i + 1] == a):
			print(chet)
			stop = 1
			break
		if komands[i] == a or komands[i] == b:
			delete.append(i + 1)
		else:
			delete.append(i)
	if stop == 1:
		break
	for i in range(len(delete)):
		komands.pop(delete[i])
		for j in range(i + 1, len(delete)):
			delete[j] -= 1
if stop == 0:
	print('Final!')


string = input().split()
n = int(string[0])
a = int(string[1])
b = int(string[2])
if a > b:
	tmp = a
	a = b
	b = tmp
theymeet = False
div = n / 2
dn = n
n /= 2
count = 0
rounds = 0
if a <= n and b > n:
	print('Final!')
else:
	while dn > 1:
		dn /= 2
		rounds += 1
	while div >= 1:
		if a <= n and b > n:
			break
		elif a >= n and b >= n:
			div /= 2
			n += div
			count += 1
		elif a <= n and b <= n:
			div /= 2
			n -= div
			count += 1
	ans = rounds - count
	print(ans)


(n, a, b) = [int(x) for x in input().split()]
a -= 1
b -= 1
res = 0
while a != b:
	a //= 2
	b //= 2
	res += 1
if 2 ** res == n:
	print('Final!')
else:
	print(res)


(n, a, b) = list(map(int, input().split()))
a -= 1
b -= 1
q = []
for i in range(n // 2):
	q.append(((2 * i, 2 * i + 1), 1))

def wi(p):
	if a in p and b in p:
		return True
	return False

def ch(p):
	if a in p:
		return a
	if b in p:
		return b
	return p[0]
while 1:
	if len(q) == 1:
		print('Final!')
		return
	p1 = q[0][0]
	p2 = q[1][0]
	if wi(p1):
		print(q[0][1])
		return
	if wi(p2):
		print(q[1][1])
		return
	q.append(((ch(p1), ch(p2)), q[0][1] + 1))
	del q[0]
	del q[0]


(n, a, b) = map(int, input().split())
a -= 1
b -= 1
ans = 0
temp = 2
for i in range(8):
	if a // temp == b // temp:
		ans = i + 1
		break
	temp *= 2
if temp == n:
	print('Final!')
else:
	print(ans)


(n, a, b) = map(int, input().split())

def dq(a, b, l, r, dem):
	if a < l or b > r:
		return 1000000000
	if a <= (l + r) // 2 and b > (l + r) // 2:
		return dem
	return min(dq(a, b, l, (l + r) // 2, dem + 1), dq(a, b, (l + r) // 2 + 1, r, dem + 1))
if a > b:
	(a, b) = (b, a)
sv = 0
_n = n
while _n != 1:
	sv = sv + 1
	_n = _n / 2
if sv == sv - dq(a, b, 1, n, 0):
	print('Final!')
else:
	print(sv - dq(a, b, 1, n, 0))


import sys
(n, a, b) = list(map(int, input().split()))
r = list(range(1, n + 1))
c = 1
while len(r) != 2:
	t = []
	for i in range(0, len(r) - 1, 2):
		if r[i] in [a, b] and r[i + 1] in [a, b]:
			print(c)
			sys.exit()
		elif r[i] in [a, b]:
			t.append(r[i])
		elif r[i + 1] in [a, b]:
			t.append(r[i + 1])
		else:
			t.append(r[i])
	r = t
	c += 1
if a in r and b in r:
	print('Final!')


(n, a, b) = (int(x) for x in input().split())
a -= 1
b -= 1
ans = 0
while True:
	a = a // 2
	b = b // 2
	ans += 1
	if a == b:
		if n == 2:
			print('Final!')
		else:
			print(ans)
		break
	n = n // 2


import math
(n, a, b) = map(int, input().split())
x = max(a, b)
y = min(a, b)
if x > n / 2 and y <= n / 2:
	print('Final!')
	exit(0)
else:
	z = math.log(n, 2)
	while n != 1:
		if y > n / 2:
			y -= n / 2
			x -= n / 2
		if x > n / 2 and y <= n / 2:
			print(int(z))
			exit(0)
		n = n / 2
		z -= 1


(n, a, b) = list(map(int, input().split()))

def ll(x):
	if x == 1:
		return 0
	return 1 + ll(x // 2)

def main(n, a, b):
	if n == 1:
		return 0
	q = n // 2
	if a <= q and b > q or (a > q and b <= q):
		return ll(n)
	return main(q, (a - 1) % q + 1, (b - 1) % q + 1)
r = main(n, a, b)
if 2 ** r == n:
	print('Final!')
else:
	print(r)


GI = lambda : int(input())
GIS = lambda : map(int, input().split())
LGIS = lambda : list(GIS())
from math import log

def main():
	(n, a, b) = GIS()
	final = log(n, 2)
	d = abs(b - a)
	rounds = int(log(d, 2)) + 1
	if rounds == 1 and (a - 1) // 2 != (b - 1) // 2:
		rounds += 1
	print(rounds if rounds < final else 'Final!')

def main():
	(n, a, b) = GIS()
	a -= 1
	b -= 1
	final = log(n, 2)
	rounds = 0
	while a != b:
		a //= 2
		b //= 2
		rounds += 1
	print(rounds if rounds < final else 'Final!')
main()


(n, a, b) = map(int, input().split())
(a, b, n) = (bin(a - 1)[2:], bin(b - 1)[2:], bin(n - 1)[2:])
(a, b) = ('0' * (len(n) - len(a)) + a, '0' * (len(n) - len(b)) + b)
for i in range(len(n)):
	if a[i] != b[i]:
		if i == 0:
			print('Final!')
		else:
			print(len(n) - i)
		quit()


(n, a, b) = map(int, input().split())
(a, b, v) = (a - 1, b - 1, 0)
while a != b:
	(a, b, v) = (a >> 1, b >> 1, v + 1)
print('Final!' if n == 1 << v else v)


import math
(n, a, b) = map(int, input().split())
rounds = int(math.log(n, 2))
a -= 1
b -= 1
a = ('000000000000' + bin(a)[2:])[-8:]
b = ('000000000000' + bin(b)[2:])[-8:]
for (i, x, y) in zip(range(100), a, b):
	if x != y:
		if len(a) - i == rounds:
			print('Final!')
		else:
			print(len(a) - i)
		break


(n, a, b) = map(int, input().split())
x = max(a, b)
y = min(a, b)
n = int(n / 2)
c = 0
if y <= n and x > n:
	print('Final!')
else:
	while a != b:
		c += 1
		a = (a + 1) // 2
		b = (b + 1) // 2
	print(c)


(n, a, b) = map(int, input().split())
par = []
if a > b:
	(a, b) = (b, a)
for i in range(1, n + 1):
	par.append(i)
rnd = 0
while n >= 2:
	n //= 2
	rnd += 1
ans = 1
while True:
	t1 = par.index(a)
	t2 = par.index(b)
	m = len(par)
	if t1 == t2 - 1 and (not t1 % 2):
		if ans == rnd:
			print('Final!')
		else:
			print(ans)
		exit(0)
	ans += 1
	rmi = []
	for i in range(0, m, 2):
		if par[i] == a or par[i] == b:
			rmi.append(par[i + 1])
		else:
			rmi.append(par[i])
	for i in rmi:
		par.remove(i)


import math
(n, a, b) = map(int, input().split())
roun = 1
f = 1
while roun != int(math.log(n, 2)):
	a = (a + 1) // 2
	b = (b + 1) // 2
	if a == b:
		f = 0
		print(roun)
		break
	roun += 1
if f:
	print('Final!')


(a, b, c) = map(int, input().split())
k = 1
while a > 2:
	if b > c:
		(c, b) = (b, c)
	if c == b + 1 and b % 2 == 1:
		break
	a = a // 2
	b = (b + 1) // 2
	c = (c + 1) // 2
	k += 1
if a > 2:
	print(k)
else:
	print('Final!')


rounds = {2: 1, 4: 2, 8: 3, 16: 4, 32: 5, 64: 6, 128: 7, 256: 8}
p = list(map(int, input().split()))
final = rounds[p[0]]
count = 0
if not (p[1] > p[0] // 2 and p[2] <= p[0] // 2):
	m = p[1] - 1
	n = p[2] - 1
	while m != n:
		m = m // 2
		n = n // 2
		count = count + 1
	if count == final:
		print('Final!')
	else:
		print(count)
else:
	print('Final!')


from math import ceil
(n, a, b) = map(int, input().split())
max = max(a, b)
min = min(a, b)
round = 0
while True:
	round += 1
	max = ceil(max / 2)
	min = ceil(min / 2)
	if max == min:
		break
if 2 ** round == n:
	print('Final!')
else:
	print(round)


(n, a, b) = map(int, input().split())
if n == 2:
	print('Final!')
	exit(0)
(a, b) = (min(a, b), max(a, b))
l = list(range(1, n + 1))
ans = 1
for i in range(0, len(l), 2):
	if l[i] == a and l[i + 1] == b:
		print(ans)
		exit(0)
while True:
	l2 = []
	ans += 1
	for i in range(0, len(l), 2):
		if l[i + 1] == a or l[i + 1] == b:
			l2.append(l[i + 1])
		else:
			l2.append(l[i])
	if len(l2) == 2:
		print('Final!')
		exit(0)
	for i in range(0, len(l2), 2):
		if l2[i] == a and l2[i + 1] == b:
			print(ans)
			exit(0)
	l = l2


(n, a, b) = list(map(int, input().split()))
(a, b) = (min(a, b), max(a, b))
ans = 1
while a != b - 1 or a % 2 == 0:
	a -= a // 2
	b -= b // 2
	ans += 1
lg = 0
while n > 1:
	lg += 1
	n //= 2
if lg == ans:
	print('Final!')
else:
	print(ans)


from math import *
(n, a, b) = map(int, input().split())
n1 = n
(a, b) = (min(a, b), max(a, b))
k = [i for i in range(1, n + 1)]
ans = 0
while a in k and b in k:
	i = 1
	n = len(k)
	while i < n:
		if k[i - n + len(k)] != a and k[i - n + len(k)] != b:
			k.pop(i - n + len(k))
		else:
			k.pop(i - 1 - n + len(k))
		i += 2
	ans += 1
if log2(n1) == ans:
	print('Final!')
else:
	print(ans)


(n, a, b) = [int(el) for el in input().split()]
for i in range(1, n + 1):
	if 2 ** i == n:
		n = i
		break
for i in range(1, n + 1):
	if (a - 1) // 2 ** i == (b - 1) // 2 ** i:
		if i == n:
			print('Final!')
		else:
			print(i)
		break


import sys
import math
import bisect

def solve(n, a, b):
	ans = 0
	while a != b:
		a >>= 1
		b >>= 1
		ans += 1
	if 2 ** ans == n:
		return 'Final!'
	return ans

def main():
	(n, a, b) = map(int, input().split())
	print(solve(n, a - 1, b - 1))
main()


(n, a, b) = [int(x) for x in input().split()]
if a > b:
	(a, b) = (b, a)
import math as m
rounds = int(m.log2(n))
mr = rounds
(lft, rgt) = (1, n)
while True:
	mdl = (lft + rgt) // 2
	if a <= mdl and b > mdl:
		break
	rounds -= 1
	if a <= mdl and b <= mdl:
		rgt = mdl
	elif a > mdl and b > mdl:
		lft = mdl + 1
if rounds == mr:
	print('Final!')
else:
	print(rounds)


import math
(n, a, b) = map(int, input().split())
arr = [i for i in range(1, n + 1)]
(i, r) = (0, 1)
while True:
	arr1 = []
	for i in range(0, len(arr), 2):
		if arr[i] == a and arr[i + 1] == b or (arr[i] == b and arr[i + 1] == a):
			if len(arr) == 2:
				print('Final!')
			else:
				print(r)
			exit(0)
		elif arr[i + 1] == a or arr[i] == a:
			arr1.append(a)
		elif arr[i + 1] == b or arr[i] == b:
			arr1.append(b)
		else:
			arr1.append(arr[i])
	arr = arr1
	r += 1


import sys
input = sys.stdin.readline

def solve(n, a, b):
	if a % 2 == 1 and b % 2 == 0 and (b == a + 1):
		return 1
	return 1 + solve(n // 2, (a + 1) // 2, (b + 1) // 2)
l = input().split()
n = int(l[0])
a = int(l[1])
b = int(l[2])
if a > b:
	(a, b) = (b, a)
z = solve(n, a, b)
if pow(2, z) == n:
	print('Final!')
else:
	print(z)


import math
str_data = input().split()
count = int(str_data[0])
a1 = int(str_data[1])
a2 = int(str_data[2])
max_rounds = math.log(count, 2)
k1 = min(a1, a2)
k2 = max(a1, a2)
delimeter = count / 2
count /= 2
res = int(max_rounds)
while not k1 <= delimeter < k2:
	res -= 1
	count /= 2
	if delimeter < k1:
		delimeter += count
	else:
		delimeter -= count
if res == max_rounds:
	print('Final!')
else:
	print(res)


(n, a, b) = [int(v) for v in input().split()]
a -= 1
b -= 1
r = 1
while True:
	nn = n // 2
	aa = a // 2
	bb = b // 2
	if aa == bb:
		print('Final!' if nn == 1 else r)
		break
	(n, a, b) = (nn, aa, bb)
	r += 1


def main():
	(N, A, B) = map(int, input().split())
	n = len(f'{N:b}') - 1
	for i in range(1, n):
		j = 1
		for k in range(2 ** i, N + 1, 2 ** i):
			if j <= A <= k and j <= B <= k:
				print(i)
				return
			j = k + 1
	print('Final!')
main()


def match_num(n):
	return (n + 1) // 2

def rec(r, teams, t1, t2):
	if teams == 2:
		return 'Final!'
	m1 = match_num(t1)
	m2 = match_num(t2)
	if m1 == m2:
		return r
	return rec(r + 1, teams // 2, m1, m2)

def problem():
	in1 = input()
	args = list(map(int, in1.split()))
	teams = args[0]
	t1 = args[1]
	t2 = args[2]
	result = rec(1, teams, t1, t2)
	return result
print(problem())


import math
(n, a, b) = map(int, input().split())
(a, b) = (min(a, b), max(a, b))
n1 = math.log(n, 2)
r = 1
c = n / 2
while 1:
	if a <= c and b > c:
		break
	else:
		r += 1
		if b <= c:
			c = c / 2
		elif a > c:
			a = a - c
			b = b - c
			c = c / 2
if r == 1:
	print('Final!')
else:
	print(int(n1 - r + 1))


(n, a, b) = map(int, input().split())
a -= 1
b -= 1
a //= 2
b //= 2
k = 1
while a != b and n != 2:
	a //= 2
	b //= 2
	n //= 2
	k += 1
if n == 2:
	print('Final!')
else:
	print(k)


import math
(n, a, b) = map(int, input().split())
s = 1
e = n
cnt = 0

def round(s, e, a, b, cnt, n):
	cnt += 1
	m = (s + e) // 2
	if s <= a <= m and m + 1 <= b <= e:
		if cnt == 1:
			print('Final!')
		else:
			print(int(math.log2(n) - cnt + 1))
	elif s <= a <= m and s <= b <= m:
		round(s, m, a, b, cnt, n)
	elif m + 1 <= a <= e and m + 1 <= b <= e:
		round(m + 1, e, a, b, cnt, n)
round(s, e, min(a, b), max(a, b), cnt, n)


import math, sys
(n, a, b) = map(int, input().split())
final = int(math.log2(n))
teams = list(range(1, n + 1))
for round in range(1, final + 1):
	new_teams = []
	(a_in, b_in) = (False, False)
	for (x, y) in zip(range(0, len(teams), 2), range(1, len(teams), 2)):
		(t1, t2) = (teams[x], teams[y])
		if {t1, t2} == {a, b}:
			print('Final!' if round == final else round)
			sys.exit(0)
		elif (a == t1 or a == t2) and (not a_in):
			new_teams.append(a)
			a_in = True
		elif (b == t1 or b == t2) and (not b_in):
			new_teams.append(b)
			b_in = True
		else:
			new_teams.append(t1)
	if len(new_teams) == 0 and set(teams) == {a, b}:
		print('Final!' if round == final else round)
		sys.exit(0)
	teams = new_teams


(n, a, b) = map(int, input().split())
if a > b:
	(a, b) = (b, a)
if a <= n // 2 and b > n // 2:
	print('Final!')
else:
	a += n - 1
	b += n - 1
	for i in range(100):
		if a == b:
			print(i)
			break
		a //= 2
		b //= 2


import math
(n, a, b) = map(int, input().split(' '))
rounds = math.log(n, 2)
r = int(rounds)
for i in range(1, int(rounds) + 1):
	a = math.ceil(a / 2)
	b = math.ceil(b / 2)
	if a == b:
		if i == r:
			print('Final!')
			break
		else:
			print(i)
			break


def make_tour(people):
	teams = []
	people.sort()
	for i in range(len(people)):
		if i % 2 == 0:
			teams.append([people[i]])
		else:
			teams[-1].append(people[i])
	return teams
(n, a, b) = map(int, input().split())
people = []
ind = 1
fl = True
for i in range(1, n + 1):
	people.append(i)
while True:
	teams = make_tour(people)
	if len(teams) == 1:
		break
	for i in range(len(teams)):
		if teams[i][0] == a and teams[i][1] == b or (teams[i][0] == b and teams[i][1] == a):
			fl = False
			print(ind)
			break
		elif teams[i][0] == a or teams[i][1] == a:
			teams[i] = [a]
		elif teams[i][0] == b or teams[i][1] == b:
			teams[i] = [b]
		else:
			teams[i] = [teams[i][0]]
	if not fl:
		break
	people = []
	for i in range(len(teams)):
		for j in range(len(teams[i])):
			people.append(teams[i][j])
	ind += 1
if fl:
	print('Final!')


import sys
[n, a, b] = map(int, sys.stdin.readline().strip().split())

def log2(n):
	if n == 1:
		return 0
	else:
		return log2(n // 2) + 1

def zf(x, d):
	return bin(x)[2:].zfill(d)

def common_suffix_len(a, b):
	i = 0
	for (ca, cb) in zip(a, b):
		if ca != cb:
			break
		i += 1
	return i
d = log2(n)
sl = common_suffix_len(zf(a - 1, d), zf(b - 1, d))
if sl == 0:
	print('Final!')
else:
	print(d - sl)


(n, a, b) = map(int, input().split())
c = 1
import math
while True:
	a = a / 2
	b = b / 2
	if math.ceil(a) == math.ceil(b):
		if 2 ** c == n:
			c = 'Final!'
		print(c)
		break
	c += 1


import math
(n, a, b) = map(int, input().split())
nummatches = int(math.log(n) / math.log(2))
A = []
for i in range(1, n + 1):
	A.append(int(i))
round = 0
if a > b:
	tmp = b
	b = a
	a = tmp

def spel(A, a, b):
	global round
	round += 1
	if b > a:
		if len(A) == 2:
			return 'Final!'
		elif A.index(a) % 2 == 0 and A.index(b) == A.index(a) + 1:
			return round
		else:
			for k in range(0, len(A), 2):
				if A[k] != a and A[k] != b:
					A[int(k)] = 0
				elif A[k] == a or A[k] == b:
					A[int(k) + 1] = 0
			while 0 in A:
				A.remove(0)
			return spel(A, a, b)
print(spel(A, a, b))


import math
(n, a, b) = map(int, input().split())
k = math.log(n, 2)
for i in range(1, 9):
	a = math.ceil(a / 2)
	b = math.ceil(b / 2)
	if a == b:
		break
if i == int(k):
	print('Final!')
else:
	print(i // 1)


import math
(n, a, b) = map(int, input().split())
teams = list(range(1, n + 1))
if a > n // 2:
	teams = teams[n // 2:]
else:
	teams = teams[:n // 2]
cnt = 0
while a in teams and b in teams:
	pl = teams.index(a)
	if pl >= len(teams) // 2:
		teams = teams[len(teams) // 2:]
	else:
		teams = teams[:len(teams) // 2]
	cnt += 1
if cnt == 0:
	print('Final!')
else:
	print(int(math.log(n, 2)) - cnt)


import math
arr = list(map(int, input().split()))
n = arr[0]
rounds = math.log2(n)
a = arr[1]
a = int((a % 2 + a) / 2)
b = arr[2]
b = int((b % 2 + b) / 2)
roundCount = 1
while a != b:
	a = math.ceil(a / 2)
	b = math.ceil(b / 2)
	roundCount += 1
if roundCount == rounds:
	print('Final!')
else:
	print(roundCount)


(n, a, b) = list(map(int, input().split(' ')))
a -= 1
b -= 1
n -= 1
res = len(bin(a ^ b)) - 2
if res == len(bin(n)) - 2:
	print('Final!')
else:
	print(res)


(n, a, b) = map(int, input().split())
print((a - 1 ^ b - 1).bit_length() % (n.bit_length() - 1) or 'Final!')


R = lambda : list(map(int, input().split()))
(n, a, b) = R()
import math
k = math.ceil(math.log(n, 2))
i = 1
while a != b:
	a = (a + 1) // 2
	b = (b + 1) // 2
	i += 1
res = i - 1
if res == k:
	print('Final!')
else:
	print(res)


(n, a, b) = list(map(int, input().split()))
a -= 1
b -= 1
n_round = 0
while n > 2:
	n_round += 1
	a //= 2
	b //= 2
	n //= 2
	if a == b:
		break
else:
	print('Final!')
	exit()
print(n_round)


s = input().split()
(n, a, b) = (int(s[0]), int(s[1]), int(s[2]))
arr = [0 for i in range(n)]
arr[a - 1] = 1
arr[b - 1] = 1
k = 0
while len(arr) != 0:
	for i in range(0, len(arr), 2):
		arr[i] = arr[i] + arr[i + 1]
		if len(arr) == 2 and arr[i] == 2:
			print('Final!')
			exit(0)
		elif arr[i] == 2:
			print(k + 1)
			exit(0)
	arr = arr[::2]
	k += 1


(n, a, b) = map(int, input().split())
cnt = 0
while n > 2:
	cnt += 1
	if a % 2 == 1:
		a += 1
	if b % 2 == 1:
		b += 1
	if a == b:
		break
	a = a // 2
	b = b // 2
	n /= 2
if n == 2 and a + b == 3:
	print('Final!')
else:
	print(cnt)


from math import *
f = input().split()
n = int(f[0])
a = bin(int(f[1]) - 1)[2:]
b = bin(int(f[2]) - 1)[2:]
for i in range(8 - len(a)):
	a = '0' + a
for i in range(8 - len(b)):
	b = '0' + b
c = ''
for i in range(8):
	c = c + str(int(a[i]) ^ int(b[i]))
c = str(int(c))
if len(c) == log(n, 2):
	print('Final!')
else:
	print(len(c))


s = input()
n = int(s.split(' ')[0])
a = int(s.split(' ')[1])
b = int(s.split(' ')[2])
z = n
r = 1
t = 0
endd = 0
super = 0
while endd == 0:
	if (b - a == 1 or a - b == 1) and endd == 0 and (a % 2 == 0 and b % 2 == 1 and (a > b) or (a % 2 == 1 and b % 2 == 0 and (b > a))):
		endd = 1
		t = r
		if z // 2 == 1 or z // 2 == 0:
			super = 1
	z = z // 2
	a = a // 2 + a % 2
	b = b // 2 + b % 2
	r += 1
if super == 1:
	print('Final!')
else:
	print(t)


(n, a, b) = list(map(int, input().split()))
half = n // 2
if a > half and b <= half or (a <= half and b > half):
	print('Final!')
else:
	if a & 1 == 1:
		a += 1
	if b & 1 == 1:
		b += 1
	count = 1
	while abs(a - b) >= 1:
		count += 1
		a = a // 2
		b = b // 2
		if a & 1 == 1:
			a += 1
		if b & 1 == 1:
			b += 1
	print(count)


(n, a, b) = list(map(int, input().split()))
ls = list(range(1, n + 1))
k = 0
rounds = 0
m = n
while m > 1:
	m >>= 1
	rounds += 1
while len(ls) > 1:
	k += 1
	newls = []
	for i in range(0, len(ls), 2):
		if (ls[i] == a or ls[i] == b) and (ls[i + 1] == a or ls[i + 1] == b):
			if k == rounds:
				print('Final!')
			else:
				print(k)
			newls = []
			break
		elif ls[i] == a or ls[i + 1] == a:
			newls.append(a)
		elif ls[i] == b or ls[i + 1] == b:
			newls.append(b)
		else:
			newls.append(ls[i])
	ls = newls


(n, a, b) = map(int, input().split())
s = 0
i = 0
k = 0
while n != 1:
	n //= 2
	k += 1
while s == 0:
	i += 1
	if a == b + 1 and a % 2 == 0 or (b == a + 1 and b % 2 == 0):
		s = i
	a = a // 2 + a % 2
	b = b // 2 + b % 2
if s == k:
	print('Final!')
else:
	print(s)


import math
x = list(map(int, input().split()))
(m, a, b) = (x[0], x[1], x[2])
if a > b:
	(a, b) = (b, a)
n = 0
while b - a > 1 or (a % 2 == 0 and b % 2 > 0):
	a = int(math.ceil(a / 2.0))
	b = int(math.ceil(b / 2.0))
	n += 1
	m //= 2
if m <= 2:
	print('Final!')
else:
	print(n + 1)


import math

def solve(n, a, b):
	r = math.log2(n)
	c = 0
	l = [i for i in range(1, n + 1)]
	while 1:
		c += 1
		if l.index(a) % 2 == 0 and l.index(b) % 2 == 1 and (l.index(b) - l.index(a) == 1):
			if c == r:
				return 'Final!'
			else:
				return c
		for i in range(0, len(l) - 1, 2):
			if l[i] == a or l[i] == b:
				l[i + 1] = 0
			else:
				l[i] = 0
		l = list(filter(0 .__ne__, l))
(n, a, b) = map(int, input().split(' '))
if a > b:
	(a, b) = (b, a)
print(solve(n, a, b))


(v, f, s) = map(int, input().split())
(f, s) = (f - 1, s - 1)
a = list(range(v))
x = []
i = 0
z = True
g = 1
while z:
	for i in range(0, v, 2):
		if a[i + 1] == f and a[i] == s or (a[i + 1] == s and a[i] == f):
			print([g, 'Final!'][v == 2])
			exit(0)
		elif a[i + 1] != f and a[i] == s or (a[i + 1] != s and a[i] == f):
			x.append(a[i])
		elif a[i + 1] == f and a[i] != s or (a[i + 1] == s and a[i] != f):
			x.append(a[i + 1])
		else:
			x.append(a[i + 1])
	a = x
	v = v // 2
	x = []
	g += 1


from math import log2
(n, a, b) = map(int, input().split())
if a > b:
	(a, b) = (b, a)
c = [i + 1 for i in range(n)]
for i in range(int(log2(n) - 1)):
	nn = len(c) // 2
	new = [0] * nn
	for j in range(0, 2 * nn, 2):
		if c[j] == a and c[j + 1] == b:
			print(i + 1)
			exit(0)
		if c[j] == a or c[j + 1] == a:
			new[j // 2] = a
		elif c[j] == b or c[j + 1] == b:
			new[j // 2] = b
	c = new.copy()
print('Final!')


import math
(n, a, b) = map(int, input().split())
if b < a:
	(a, b) = (b, a)
logans = 0
nn = n
while nn > 1:
	logans += 1
	nn //= 2
ans = logans
while True:
	if a <= n // 2 and b > n // 2:
		if ans == logans:
			print('Final!')
			break
		else:
			print(ans)
			break
	elif a <= n // 2 and b <= n // 2:
		ans -= 1
		n //= 2
	elif a > n // 2 and b > n // 2:
		a -= n // 2
		b -= n // 2
		n // 2


(n, a, b) = map(int, input().split())
m = len(bin(a - 1 ^ b - 1)) - 2
print('Final!' if m == len(bin(n)) - 3 else m)


(total_teams, team1, team2) = map(int, input().split())
count = 1
while True:
	if round(team1 / 2 + 0.1) == round(team2 / 2 + 0.1):
		break
	team1 = round(team1 / 2 + 0.1)
	team2 = round(team2 / 2 + 0.1)
	total_teams //= 2
	count += 1
if total_teams == 2:
	print('Final!')
else:
	print(count)


def I():
	return int(input())

def IL():
	return [int(i) for i in input().split()]

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

def IS():
	return input()
(n, a, b) = IM()
if a > n / 2 and b <= n / 2:
	print('Final!')
	exit()
if a <= n / 2 and b > n / 2:
	print('Final!')
	exit()
cnt = 1
from math import log
last = log(n) / log(2)
last = int(last)
lo = 1
hi = n
while lo <= hi:
	z = (lo + hi) // 2
	if a <= z and b > z or (a > z and b <= z):
		print(last)
		exit()
	last -= 1
	if a <= z and b <= z:
		hi = z
	else:
		lo = z + 1


import sys
from math import log
input = sys.stdin.readline
(n, a, b) = map(int, input().split())
x = [[i] for i in range(1, n + 1)]
for i in range(int(log(n, 2))):
	for z in x:
		if a in z and b in z:
			print(i)
			sys.exit(0)
	new = []
	for k in range(0, len(x) // 2):
		new.append(x[k * 2] + x[k * 2 + 1])
	x = new[:]
print('Final!')


(n, a, b) = map(int, input().split())
a -= 1
b -= 1
mask = 1
round = 1
while a != b:
	if a & ~mask == b & ~mask:
		break
	round += 1
	mask = (mask << 1) + 1
print('Final!' if mask + 1 == n else round)


import sys
from math import log
input = sys.stdin.readline

def prog():
	(n, a, b) = map(int, input().split())
	a -= 1
	b -= 1
	match = 0
	while a != b:
		a //= 2
		b //= 2
		match += 1
	if 1 << match == n:
		print('Final!')
	else:
		print(match)
prog()


I = lambda : map(int, input().split())
(n, a, b) = I()
n1 = n
c = 0
while a != b:
	a = (a + 1) // 2
	b = (b + 1) // 2
	c += 1
	n = n // 2
if n == 1:
	print('Final!')
else:
	print(c)


from math import log2
(n, a, b) = map(int, input().split())
n = int(log2(n))
for i in range(1, n + 1):
	if (a - 1) // 2 ** i == (b - 1) // 2 ** i:
		if i == n:
			print('Final!')
		else:
			print(i)
		break


import math
import sys
list = input().split()
n = int(list[0])
a = int(list[1])
b = int(list[2])
smaller = a if a < b else b
bigger = a if a > b else b
final = math.log2(n)
step = n // 2
round = int(final)
l = [step]
while step >= 1:
	step = step // 2
	temp = []
	for i in l:
		if smaller <= i and bigger > i:
			if round == final:
				print('Final!')
			else:
				print(round)
			sys.exit(0)
		else:
			temp.append(i + step)
			temp.append(i - step)
	l = temp
	round -= 1


def divide(l, r, a, b):
	m = (l + r) // 2
	if a <= m and b > m:
		return 1
	elif b <= m:
		return divide(l, m, a, b) + 1
	elif a > m:
		return divide(m + 1, r, a, b) + 1
(n, a, b) = map(int, input().split())
if a > b:
	(a, b) = (b, a)
num = divide(1, n, a, b)
cnt = 0
while n > 0:
	cnt += 1
	n = n >> 1
if num == 1:
	print('Final!')
else:
	print(cnt - num)


(n, a, b) = [int(i) for i in input().split()]
nd = 0
while True:
	if a % 2 != 0:
		a = (a + 1) // 2
	else:
		a = a // 2
	if b % 2 != 0:
		b = (b + 1) // 2
	else:
		b = b // 2
	if a == b:
		nd += 1
		break
	nd += 1
nk = 0
while n > 2:
	n = n // 2
	nk += 1
if nk + 1 == nd:
	print('Final!')
else:
	print(nd)


import math

class CodeforcesTask931BSolution:

	def __init__(self):
		self.result = ''
		self.n_a_b = []

	def read_input(self):
		self.n_a_b = [int(x) for x in input().split(' ')]

	def process_task(self):
		result = 0
		table = [x + 1 for x in range(self.n_a_b[0])]
		for r in range(int(math.log2(self.n_a_b[0]))):
			ntable = [0 for x in range(self.n_a_b[0] // 2 ** (r + 1))]
			for x in range(len(table) // 2):
				winner = table[x * 2]
				if table[x * 2 + 1] in self.n_a_b[1:]:
					if winner in self.n_a_b[1:]:
						result = r + 1
					else:
						winner = table[x * 2 + 1]
				ntable[x] = winner
			table = ntable
		if result == int(math.log2(self.n_a_b[0])):
			self.result = 'Final!'
		else:
			self.result = str(result)

	def get_result(self):
		return self.result
Solution = CodeforcesTask931BSolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


import math
import sys

def main():
	(n, a, b) = map(int, sys.stdin.readline().split())
	a -= 1
	b -= 1
	total_rounds = int(math.log2(n))
	for r in range(1, total_rounds + 1):
		pow2 = 2 ** r
		if a // pow2 == b // pow2:
			if r == total_rounds:
				print('Final!')
			else:
				print(r)
			return
main()


j = list(map(int, input().split()))
n = j[0]
a = j[1]
b = j[2]
m = 0
l = 1
r = n
k = 0
p = 0
while n > 1:
	n = n // 2
	m = m + 1
p = m
while True:
	k = (l + r) // 2
	if a > k and b <= k:
		if m == p:
			print('Final!')
			break
		else:
			print(m)
			break
	if a <= k and b > k:
		if m == p:
			print('Final!')
			break
		else:
			print(m)
			break
	if a <= k and b <= k:
		r = k
		m = m - 1
	if a > k and b > k:
		l = k + 1
		m = m - 1


from math import log
(n, a, b) = map(int, input().strip().split(' '))
teams = sorted((a - 1, b - 1))
R = int(log(n, 2))
div = n // 2
for r in range(R, 0, -1):
	if teams[0] < div and teams[1] >= div:
		if r == R:
			print('Final!')
		else:
			print(r)
		break
	teams[0] %= div
	teams[1] %= div
	div //= 2


import math
(n, a, b) = map(int, input().split())
r = int(math.log2(n))
up = n
low = 1
mid1 = (up + low) // 2
for i in range(int(math.log2(n))):
	if min(a, b) <= mid1 and max(a, b) > mid1:
		break
	else:
		r -= 1
		mid2 = mid1
		if min(a, b) <= mid1 and max(a, b) <= mid1:
			up = mid1 - 1
			mid1 = (up + low) // 2
		else:
			low = mid1 + 1
			mid1 = (up + low) // 2
if r == int(math.log2(n)):
	print('Final!')
else:
	print(r)


(n, a, b) = [int(x) - 1 for x in input().split()]
n += 1
d = 2
ost_1 = a // d
ost_2 = b // d
r = 1
while ost_1 != ost_2 and d != n:
	d *= 2
	ost_1 = a // d
	ost_2 = b // d
	r += 1
if d == n:
	print('Final!')
else:
	print(r)


from math import log
(n, a, b) = map(int, input().split())
a -= 1
b -= 1
max_r = int(log(n, 2))
c = 0
while a // 2 != b // 2:
	a //= 2
	b //= 2
	n //= 2
	c += 1
c += 1
print('Final!' if c == max_r else c)


line = input().split(' ')
n = int(line[0])
a = int(line[1])
b = int(line[2])
teams = list(range(1, n + 1))
rounds = 0
while len(teams) > 2:
	rounds += 1
	new_teams = []
	for index in range(0, len(teams) // 2):
		x = teams[index * 2]
		y = teams[index * 2 + 1]
		if x == a and y == b or (x == b and y == a):
			break
		if a in [x, y]:
			new_teams.append(a)
		elif b in [x, y]:
			new_teams.append(b)
		else:
			new_teams.append(max(x, y))
	else:
		teams = new_teams
		continue
	break
else:
	print('Final!')
if len(teams) > 2:
	print(rounds)


def thisRound(teamList, a, b, ans):
	ans += 1
	newList = []
	l = len(teamList)
	if l == 2:
		return 'Final!'
	for j in range(0, l, +2):
		if teamList[j] == a and teamList[j + 1] == b:
			return ans
		elif teamList[j] == b and teamList[j + 1] == a:
			return ans
		elif teamList[j] == a or teamList[j + 1] == a:
			newList.append(a)
		elif teamList[j] == b or teamList[j + 1] == b:
			newList.append(b)
		else:
			newList.append(teamList[j])
	return thisRound(newList, a, b, ans)
(n, a, b) = map(int, input().split())
teamList = []
for i in range(1, n + 1):
	teamList.append(i)
print(thisRound(teamList, a, b, 0))


import math
(n, a, b) = map(int, input().split())
(a, b) = (min(a, b), max(a, b))
r = list(range(1, n + 1))
it = 0
while True:
	r1 = []
	for (i, j) in zip(*[iter(r)] * 2):
		if i in (a, b):
			if j in (a, b):
				break
			r1.append(i)
		elif j in (a, b):
			r1.append(j)
		else:
			r1.append(i)
	else:
		it += 1
		r = r1.copy()
		continue
	it += 1
	break
print(it if it != int(math.log2(n)) else 'Final!')


(n, a, b) = list(map(int, input().strip().split(' ')))
teams = list(range(1, n + 1))
rno = 1
if a > b:
	(a, b) = (b, a)
while True:
	if len(teams) == 2:
		print('Final!')
		exit(0)
	else:
		nteams = []
		for i in range(0, len(teams), 2):
			match = [teams[i], teams[i + 1]]
			if [a, b] == match:
				print(rno)
				exit(0)
			elif a in match:
				nteams.append(a)
			elif b in match:
				nteams.append(b)
			else:
				nteams.append(match[1])
		teams = nteams
		rno += 1


import math
(n, a, b) = list(map(int, input().split()))
m = int(math.log(n, 2))
for x in range(1, m + 1):
	if math.ceil(a / 2 ** x) == math.ceil(b / 2 ** x):
		if x == m:
			print('Final!')
		else:
			print(x)
		exit()


(n, a, b) = map(int, input().split())
a -= 1
b -= 1
d = abs(b - a)
i = 1
while a // 2 ** i != b // 2 ** i:
	i += 1
if 2 ** i == n:
	print('Final!')
else:
	print(i)


import math
(n, a, b) = map(int, input().split())

def f(n, a, b):
	if n == 2:
		return 1
	a_ = math.ceil(a / 2)
	b_ = math.ceil(b / 2)
	if a_ == b_:
		return 1
	return 1 + f(n / 2, a_, b_)
ans = f(n, a, b)
if ans == math.log(n, 2):
	print('Final!')
else:
	print(ans)


t = list(map(int, input().split()))
n = t[0]
a = t[1]
b = t[2]
ans = 0
while a != b:
	n //= 2
	a = (a + 1) // 2
	b = (b + 1) // 2
	ans += 1
if n == 1:
	print('Final!')
else:
	print(ans)


(n, a, b) = (int(x) for x in input().split())
arr = [i for i in range(1, n + 1)]
round = 0
flag = True
while len(arr) > 2 and flag:
	round += 1
	i = 0
	while i < len(arr) - 1:
		if a in arr[i:i + 2]:
			if b in arr[i:i + 2]:
				print(round)
				flag = False
				break
			else:
				arr[i:i + 2] = [a]
		elif b in arr[i:i + 2]:
			arr[i:i + 2] = [b]
		else:
			arr[i:i + 2] = [arr[i]]
		i += 1
if len(arr) == 2 and flag:
	print('Final!')


(n, a, b, i, z) = map(int, input().split() + [1, 0])
while i < n:
	if (a - 1) // i == (b - 1) // i:
		exit(print(z))
	(i, z) = (i * 2, z + 1)
print('Final!')


z = list(input().split())
n = int(z[0])
a = int(z[1])
b = int(z[2])
if a % 2 == 0:
	a = a
else:
	a = a + 1
if b % 2 == 0:
	b = b
else:
	b = b + 1
s1 = abs(b - a)
k = 0
while a != b:
	a = a / 2
	b = b / 2
	k = k + 1
	if a % 2 == 0:
		a = a
	else:
		a = a + 1
	if b % 2 == 0:
		b = b
	else:
		b = b + 1
d = 0
while n >= 2:
	n = n / 2
	d = d + 1
if k + 1 == d:
	print('Final!')
else:
	print(k + 1)


(n, a, b) = map(int, input().split())
i = 1
k = 0
f = False
while i < n:
	if (a - 1) // i == (b - 1) // i:
		f = True
		break
	i *= 2
	k += 1
if f == True:
	print(k)
else:
	print('Final!')


(n, a, b) = map(int, input().split())
x = list(range(1, n + 1))
y = []
j = 0
while len(x) > 2:
	for i in range(0, n, 2):
		if x[i] == a and x[i + 1] == b or (x[i] == b and x[i + 1] == a):
			print(j + 1)
			exit()
		if x[i + 1] == a or x[i + 1] == b:
			y.append(x[i + 1])
		else:
			y.append(x[i])
	x = y.copy()
	y = []
	n //= 2
	j += 1
print('Final!')