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

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

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

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

n, a, b = map(int, input().split())
arr = [i + 1 for i in range(n)]
stage = 1
while len(arr) > 1:
	na = []
	for i in range(len(arr) // 2):
		if arr[i * 2] == a and arr[i * 2 + 1] == b:
			print('Final!' if len(arr) == 2 else stage)
			exit()
		elif arr[i * 2] == b and arr[i * 2 + 1] == a:
			print('Final!' if len(arr) == 2 else stage)
			exit()
		elif arr[i * 2] == a or arr[i * 2] == b:
			na.append(arr[i * 2])
		elif arr[i * 2 + 1] == a or arr[i * 2 + 1] == b:
			na.append(arr[i * 2 + 1])
		else:
			na.append(arr[i * 2])
	arr = na[:]
	stage += 1

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

a,b,r=a-1,b-1,0

while a!=b:

 a//=2

 b//=2

 r+=1

print(r if 2**r<n else 'Final!')

# Made By Mostafa_Khaled

a, b, c = input().split(' ')
a, b, c = int(a), int(b), int (c)
h = 0
f = 1
while (a > 1):
   h += 1
   a = a // 2
   if b > a and c > a:
        b -= a
        c -= a
   if f == 1 and((b <= a and c > a) or (b > a and c <= a)):
        g = h - 1
        f = 0
if g == 0:
    print("Final!")
else:
    print(h - g)

n, a, b = map(int, input().split())
if a > b:
    a, b = b, a
r = 1
while 2 ** r < n:
    r += 1
left = 1
right = n
ans = r
mid = (left + right) // 2
while not (a <= mid and b > mid):
    ans -= 1
    if b <= mid:
        right = mid
    else:
        left = mid + 1
    mid = (left + right) // 2
if ans == r:
    print('Final!')
else:
    print(ans)

import math,sys

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

low = 1
high = n
s = int(math.log(n,2))

while low + 0.5 < high:
    if (high + low) % 2 == 0:
        mid = (high + low + 1) / 2
    else:
        mid = (high + low) / 2

    if min(a,b) < mid and max(a,b) > mid:
        break
    if min(a,b) >= mid:
        low = int(mid)
    elif max(a,b) <= mid:
        high = int(mid)

    s -= 1

if s == int(math.log(n,2)):
    print("Final!")
else:
    print(s)

from sys import stdin
n,a,b = map(int,stdin.readline().split())
rnd = 1
a-=1
b-=1
m = 0
while True:
 if (1<<m)==n:
  break
 m += 1
m+=1
while n:
 x = n & a
 y = n & b
 if x!=y:
  break
 n/=2
 rnd+=1

rnd = m +1 - rnd
if rnd==m-1:
 print "Final!"
else:
 print rnd

from math import log

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

def solution():
    n, a, b = map(int, raw_input().strip().split())
    a, b = min(a, b), max(a, b)
    if a <= (n / 2) < b:
        return 'Final!'
    while a < b <= (n / 2) or b > a > (n / 2):
        if b <= (n / 2):
            n = n / 2
        else:
            a -= n / 2
            b -= n / 2
            n = n / 2
    res = 0
    while n > 1:
        res += 1
        n /= 2
    return str(res)

if __name__ == '__main__':
    print solution()

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

a -= 1
b -= 1

ct = 0

while a != b:
	a //= 2
	b //= 2

	ct += 1

print("Final!" if 2 ** ct == n else ct)

from math import ceil
n,a,b = [int(x) for x in raw_input().split(" ")]

c=0
while a!=b:
	c+=1
	a/=2.
	a = ceil(a)
	b/=2.
	b = ceil(b)
c2 = 0
while 2**c2<n:
	c2+=1
if(c==c2):
	print "Final!"
else:
	print c

n,a,b=map(int,raw_input().split())
a,b=min(a,b),max(a,b)
from math import log
vl=0
q=log(n,2)

while n!=1:
  #n=n/2

  if  (a<n and b<=n) :
    n=n/2
    vl=vl+1
  elif (a>n and b>n):
    a=a-n
    b=b-n
  else:
    break

  #print a,b,n,vl

if vl==1:
  print "Final!"
else:
  print int(q-vl+1)

v,a,b=list(map(int,input().split()))
if v!=2:
    c=[]
    m=True
    g=1
    for i in range(v):
        c.append([i+1])
    for i in range(int(v/2)):
        c[i].append(c[i+1][0])
        c.remove(c[i+1])
        if len(set(c[i]).intersection(set([a,b])))==2:
            print(1)
            m=False
            break
    if m==True:
        for i in range(8):
            v=v/2
            g+=1
            for j in range(int(v/2)):
                if len(c)==2:
                    m=False
                    print("Final!")
                    break
                for l in range(len(c[j+1])):
                    c[j].append(c[j+1][l])
                c.remove(c[j+1])
                if len(set(c[j]).intersection(set([a,b])))==2:
                    print(g)
                    m=False
                    break
            if m==False:
                break
else:
    print("Final!")

import math
inp = raw_input().split(" ")

n = int(inp[0])
a = int(inp[1])
b = int(inp[2])
counter = 0

def f(n,a,b,counter):
    if a <= (n/2) and b > (n/2):
        return counter
    elif a <= (n/2) and b <= (n/2):
        return f(n/2,a,b,counter+1)
    elif a > n/2 and b > n/2:
        return f(n/2,a-(n/2),b-(n/2),counter+1)
    else:
        return counter

x = math.log(n)/math.log(2) - f(n,a,b,counter)

if x == math.log(n)/math.log(2):
    print "Final!"
else:
    print int(x)

import math

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

a -= 1
b -= 1

ln = int(math.log(n, 2))

r = 0
while a != b:
    a //= 2
    b //= 2
    r += 1
if ln == r:
    print "Final!"
else:
    print r

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

from itertools import zip_longest

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

def chunks(lst, count):
    n = len(lst) // count
    return list(x for x in zip_longest(*[iter(lst)] * n))

command = chunks(range(1, n + 1), n // 2)

i = 0

while True:
    i += 1
    #print(command)
    if [(a, b)] == command or [(b, a)] == command:
        print('Final!')
        break
    if (a, b) in command or (b, a) in command:
        print(i)
        break
    y = list(map(lambda x: a if a in x else (b if b in x else x[1]), command))
    if len(y) // 2:
        command = chunks(y, len(y) // 2)
    else:
        command = chunks(y, 1)

from collections import Counter,UserString
import sys
try:
    pass
    #sys.stdin=open('test','r')
except:
    pass
n,a,b=list(map(int,input().split()))
a,b=a-1,b-1
i=1
while n!=2:
    n=n//2
    a,b=a//2,b//2
    if a==b:
        print(i)
        exit()
    i=i+1
print('Final!')

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

n, a, b = list(map(int, input().split()))
p2 = 0
while 2 ** p2 != n:
	p2 += 1

r = 0
while a != b:
	a = round(a/2 + 0.001)
	b = round(b/2 + 0.001)
	r += 1
if(r == p2):
	print("Final!")
else:
	print(r)

import math
def solve(n,a,b):
	r = math.log2(n)
	c=0;
	l = [i for i in range(1,n+1)]
	#print(l)
	while(1):
		c += 1
		#print(c)
		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):
			#print(len(l))
			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))

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

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 -= 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)

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:
        if (2**i)==n:
            print('Final!')
        else:
            print(i)
        exit(0)
print('Final!')

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)

n, a, b = 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)

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)

from math import log
n,a,b=map(int,raw_input().split())
a,b=min(a,b),max(a,b)
q=log(n,2)
vl=0

while n!=1:
  if  (a<n and b<=n) :
    n=n/2
    vl=vl+1
  elif (a>n and b>n):
    b=b-n
    a=a-n
  else:
    break

if vl==1:
  print "Final!"
else:
  print int(q-vl+1)

import math
n,a,b = map(int,raw_input().split())
if a > b:
	a,b = b,a
ans = 1
final = int(math.log(n,2))
a = int(math.ceil(a/2.0))
b = int(math.ceil(b/2.0))
while b-a >= 1:
	a = int(math.ceil(a/2.0))
	b = int(math.ceil(b/2.0))
	ans += 1
if ans == final:
	print 'Final!'
else:
	print ans

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)

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)

# vars: a, b, ca, cb, cx, res, n
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!')

#To take input
# str = raw_input()
# R = float(str.split()[0])
# real = int(str.split()[1])
# R, x1, y1, x2, y2 = map(int, raw_input().split(' '))
# print "{} {} {}".format(x3, y3, r)

n, a, b = map(int, raw_input().split(' '))
i=0
if((a>n/2 and b<=n/2) or (a<=n/2 and b>n/2)):
    print("Final!")
    exit(0)

while(a!=b):
    i += 1
    a = (a+1)/2
    b = (b+1)/2

print(i)

#      *
#     * *
#    *   *
#   *  *  *  Author:Aditya Joshi
#  *       *
# *         *

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

a -= 1
b -= 1
r = 0

while a != b:

    a //= 2

    b //= 2

    r += 1
if 2 ** r < n:
    print(r)
else:
    print("Final!")

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

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

print(((a-1)^(b-1)).bit_length() % (n.bit_length()-1) or 'Final!')

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()

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)

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 = []

n, a, b = map(int, input().split())
A = [i for i in range(1, n + 1)]
ci = 0
while len(A) > 2:
    ci += 1
    B = []
    for i in range(0, len(A), 2):
        if {A[i], A[i + 1]} == {a, b}:
            print(ci)
            exit(0)
        elif A[i] in {a, b}:
            B.append(A[i])
        else:
            B.append(A[i + 1])
    A = B
print('Final!')

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

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)

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

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())

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)

n,a,b = map(int,input().split())
z = 0
q = 0
while a != b:
    z += 1
    a = (a + 1) // 2
    b = (b + 1) // 2
while n != 1:
    n //= 2
    q += 1
if z == q:
    print("Final!")
else:
    print(z)

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())

a,b,r=a-1,b-1,0

while a!=b:

 a//=2

 b//=2

 r+=1

print(r if 2**r<n else 'Final!')

# Made By Mostafa_Khaled

import sys,math
n,a,b=map(int,sys.stdin.readline().split())
ans=0
a-=1
b-=1
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(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)

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!')

'''input
8 7 5
'''
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)

# -*- coding: utf-8 -*-
# http://codeforces.com/contest/931/problem/B

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()
#    in1 = '8 7 5'

    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())
#problem()

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)

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 = 0
sup = 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):
            #ans = ans - 1
            break
        else:
            if n >= max(a, b):
                sup = n
            else:
                inf = n
            ans -= 1
print(ans)
exit()

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

a,b,c=map(int,input().split())
s=0
while(c!=b):
    c=(c+1)//2
    b=(b+1)//2
    s+=1
    a//=2
if a>1:print(s)
else:print("Final!")

import sys
#from io import StringIO

#sys.stdin = StringIO(open(__file__.replace('.py', '.in')).read())

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!')

# -*- coding: utf-8 -*-
"""
B
"""
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)

if __name__ == "__main__":
    main()

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)

v, a, b = list(map(int, input().split()))
c = []
m = True
g = 0
for i in range(v):
    c.append([i + 1])
for i in range(8):
    g += 1
    for h in range(int(v / 2)):
        if len(c) == 2:
            print("Final!")
            m = False
            break
        for l in range(len(c[h + 1])):
            c[h].append(c[h + 1][l])
        c.remove(c[h + 1])
        if len(set(c[h]).intersection([a, b])) == 2:
            m = False
            print(g)
            break
    if m == False:
        break
    v = v / 2

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;

#print(n)

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

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

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

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

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)

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())
old_n = n

if a > b:
    a += b
    b = a - b
    a -= b

teams = [i for i in range(1, n + 1)]
round = 0
while len(teams) != 1:
    round += 1
    for i in range(0, n, 2):
        if teams[i] == a and teams[i + 1] == b:
            break
        if teams[i] == a or teams[i] == b:
            teams[i + 1] = -1
        else:
            teams[i] = -1
    try:
        for i in range(n // 2):
            teams.remove(-1)
        n //= 2
    except ValueError:
        break
if round == math.log2(old_n):
    print('Final!')
else:
    print(round)

n, a, b = [int(i) for i in input().split()]
a -= 1
b -= 1
result = 0
while a != b:
    a >>= 1
    b >>= 1
    result += 1
if n == 1 << result:
    print("Final!")
else:
    print(result)

import math
n, a, b = map(int, input().split())
r0 = r1 = round(math.log2(n))
l, r = 0, n
d = (l + r) // 2
while not((a > d) ^ (b > d)):
    r1 -= 1
    if a > d:
        l = d
    else:
        r = d
    d = (l + r) // 2

if r1 == r0:
    print("Final!")
else:
    print(r1)

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

a -= 1
b -= 1
c = 1

while a > 0 or b > 0:
  a //= 2
  b //= 2
  if a == b:
    if n > 2:
      print(c)
    else:
      print("Final!")
    break
  c += 1
  n //= 2

__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
    #print(delete)
    for i in range(len(delete)):
        komands.pop(delete[i])
        for j in range(i+1, len(delete)):
            delete[j] -= 1

        #print(komands)
if stop == 0:
    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
s=b-a
d=0
while s>=2:
    s=s/2
    d=d+1
k=0
while n>=2:
    n=n/2
    k=k+1
if k==d+1:
    print('FINAL')
else:
    print(d+1)

#!/usr/bin/python
import math

n,a,b = raw_input().split()
n = int(n)
a = int(a)
b = int(b)

if a % 2 != 0:
	a += 1
if b % 2 != 0:
	b += 1

if a == b:
	rou = 1
else:
	rou = math.floor(math.log(abs(b - a), 2)) + 1
trou = math.log(n, 2)

if rou == trou:
	print 'Final!'
else:
	print int(rou)

from math import log2
n, a, b = map(int, input().split())
n1= n
final = int(log2(n))
ans = 1
while abs(a-b) > 1 or min(a, b) % 2 == 0:
    if a != 1:
        a//=2
    if(b != 1):
        b//=2
    ans+=1
if(ans != final):
    print(ans)
else:
    print("Final!")

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 10000
	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]!=b:
			temp.append(l[i])
		elif l[i]!=a and l[i+1]==b:
			temp.append(l[i+1])
		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==10000:
		print('Final!')
	else:
		print(count)
else:
	count=getRoundNumber(l,n,a,b,1)
	if count==10000:
		print('Final!')
	else:
		print(count)

v,a,b=list(map(int,input().split()))
c=[]
m=True
g=1
for i in range(v):
    c.append([i+1])
for i in range(int(v/2)):
    c[i].append(c[i+1][0])
    c.remove(c[i+1])
    if len(set(c[i]).intersection(set([a,b])))==2:
        print(1)
        m=False
        break
if m==True:
    for i in range(8):
        v=v/2
        g+=1
        for j in range(int(v/2)):
            if len(c)==2:
                m=False
                print("Final!")
                break
            for l in range(len(c[j+1])):
                c[j].append(c[j+1][l])
            c.remove(c[j+1])
            if len(set(c[j]).intersection(set([a,b])))==2:
                print(g)
                m=False
                break
        if m==False:
            break

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)
if a == b + 1 and a % 2 ==0:
    print(2)
    exit()
maxst = 0
while n != 1:
    maxst += 1
    n //= 2
tmp = b - a
curst = 0
while tmp != 1:
    curst += 1
    tmp //= 2
if (curst + 1 == maxst):
    print('Final!')
else:
    print(curst + 1)

import math
n,a,b = map(int, input().split())
if n==2:
    print('Final!')
else:
    mid=n//2
    if a<=mid and b>mid or a>mid and b<mid: print('Final!')
    else: print(int(math.log2(mid)))

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
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(n // (len(l) * 2))
                exit(0)
        elif a in el:
            gas.append(a)
        elif b in el:
            gas.append(b)
        else:
            gas.append(el[0])
    mas = gas.copy()

import math

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

r = math.ceil(math.log2(abs(a - b))) + 1

print("Final!" if r == math.ceil(math.log2(n)) else r)

v,a,b=list(map(int,input().split()))
c=0
m=v/2
if ((a<=v/2)and(b>v/2))or((a>v/2)and(b<=v/2)):
    print("Final!")
else:
    for i in range(8):
        v/=2
        if v==1:
            for g in range(8):
                if ((a<=m/2)and(b>m/2))or((a>m/2)and(b<=m/2)):
                    print(c)
                    break
                else:
                    c-=1
                    m/=2
            break
        else:
            c+=1

import math
n,a,b = map(int, input().split())
if n==2:
    print('Final!')
else:
    mid=n//2
    if a<=mid and b>mid or a>mid and b<=mid:
        print('Final!')
    elif min(a,b)%2 != 0 and abs(a-b)==1:
        print(1)
    elif max(a,b)+1==mid//2: print(int(math.log2(mid//2)))
    else:
        print(int(math.log2(mid)))

n,a,b = map(int,input().split())
a,b = (min(a,b)),max(a,b)
maxst = 0
while n != 1:
    maxst += 1
    n //= 2
tmp = b - a
curst = 0
while tmp != 1:
    curst += 1
    tmp //= 2
if a == b - 1 and a % 2 ==0:
    curst += 1
if (curst + 1 == maxst):
    print('Final!')
else:
    print(curst + 1)

from fractions import gcd
from math import factorial, ceil, sqrt, atan2, log, pi, e, asin,acos, cos, sin
from itertools import *
from fractions import Fraction
import string
import copy
import random
import bisect
from decimal import *
def id_generator(size=20, chars=string.digits):
	return ''.join(random.choice(chars) for _ in range(size))

def mp():
	return map(int,str(raw_input()).split())

n,a,b=mp()
ans=1
val=n
while n>0:
	n/=2
	if a in [1,2] and b in [1,2]:
		break
	a=(a+1)/2
	b=(b+1)/2
	ans+=1

if pow(2,ans)==val:
	print 'Final!'
else:
	print ans

v,a,b=list(map(int,input().split()))
c=0
if a%2==0:
    v-=a-2
else:
    v-=a-1
if v-b>=2:
    if b%2==0:
        v-=v-(b+1)
    else:
        v-=v-(b+2)
for i in range(8):
    v/=2
    if v<=2:
        c+=1
        break
    else:
        c+=1
print(c)

import sys
from math import log
input = sys.stdin.readline
def prog():
    n,a,b = map(int,input().split())
    if a <= n//2 and b > n//2 or a > n//2 and b <= n//2:
        print('Final!')
    else:
        print(log(n)/log(2) -1)
prog()

#!/usr/bin/python
import math

n,a,b = raw_input().split()
n = int(n)
a = int(a)
b = int(b)

rou = math.floor(math.log(abs(b - a), 2)) + 1
trou = math.log(n, 2)

if rou == trou:
	print 'Final!'
else:
	print int(rou)

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!')

main()
111
2
33
4
555
6
77
8

from math import log
n,a,b = map(int, input().split())
max_r=round(log(n, 2))
r=round(log(abs(a-b), 2) + 1)
if r == max_r:
    print("Final!")
else:
    print(r)

from math import log, ceil

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

ct = int(ceil(log(abs(a - b), 2))) + 1

print("Final!" if 2 ** ct >= n else ct)

from sys import exit
n, a, b = [int(i) for i in input().split()]
if a > b:
    a, b = b, a
ar = list(range(1, n + 1))
rnd= 0
while len(ar) > 2:
    cr = []
    rnd += 1
    for i in range(0, len(ar), 2):
        if ar[i] == a and ar[i + 1] == b:
            print(rnd)
            exit(0)
        else:
            cr.append(ar[i])
    ar.clear()
    for i in cr:
        ar.append(i)
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
s=b-a
d=0
while s>=2:
    s=s/2
    d=d+1
k=0
while n>=2:
    n=n/2
    k=k+1
if k==d+1:
    print('FINAL')
else:
    print(d+1)

n,a,b=map(int,input().split())
if abs(a-b)<(n/2):
    print(abs(a-b))
else:
    print("Final!")

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 = 0
sup = 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):
            ans = ans - 1
            break
        else:
            if n >= max(a, b):
                sup = n
            else:
                inf = n
print(ans)

from math import log, ceil

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

a -= 1
b -= 1

a -= a % 2
b += 1 - b % 2

ct = int(ceil(log(abs(a - b) + 1, 2)))

print("Final!" if 2 ** ct == n else ct)

import math
n,a,b=map(int,input().split())
if abs(a-b)<(n/2):
    y=math.log(abs(a-b),2)
    print(math.floor(y)+1)
else:
    print("Final!")

n, eq1, eq2 = map(int, raw_input().split())

times = []
for i in range(n):
	times.append(i+1)

rodada = 0
flag = False
a = n
for j in range(n/2):
	if flag:
		break
	rodada += 1
	t = []
	for i in range(0, a, 2):
		if (times[i] == eq1 and times[i+1] == eq2) or (times[i] == eq2 and times[i+1] == eq1):
			flag = True
			t.append(eq1)
			break
		elif times[i] == eq1 or times[i] == eq2:
			t.append(times[i])
		else:
			t.append(times[i+1])
	times = t
	a /= 2
if n/2 -1 == rodada and rodada != 1:
	print "Final!"
else:
	print rodada

import math,sys

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

low = 1
high = n
s = int(math.log(n,2))

while low + 0.5 < high:
    if high + low % 2 == 0:
        mid = (high + low + 1) / 2
    else:
        mid = (high + low) / 2

    if min(a,b) < mid and max(a,b) > mid:
        break
    if min(a,b) >= mid:
        low = int(mid)
    elif max(a,b) <= mid:
        high = int(mid)

    s -= 1

if s == int(math.log(n,2)):
    print("Final!")
else:
    print(s)

import math as m
n, a, b = map(int, input().split())
if a > b:
    a, b = b, a
kek = int(m.log2(n))

for i in range(kek-1, 0, -1):
	for j in range(1, 2**(kek-i)):
		if j*(2**i) < b and a <= j*(2**i):
			# print(i, j, j*(2**i))
			if i == kek-1:
				print('Final!')
				exit()
			else:
				print(i+1)
				exit()
print(1)

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:
        if (2**i)==n:
            print('Final!')
        else:
            print(i)
        exit(0)

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

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 z>1:
    #print(r, a, b)
    if ((b-a==1)or(a-b==1))and(endd==0):
        #print('end')
        endd = 1
        t = r
        if z//2==1:
            super=1
    z=z//2
    a=a//2
    b=b//2
    r+=1
#print(n, a, b)
if super==1:
    print('Final!')
else:
    print(t)

from math import log2
n, a, b = map(int, input().split())
n1= n
final = int(log2(n))
ans = 1
while(abs(a-b) > 1):
    if a != 1:
        a//=2
    if b != 1:
        b//=2

    ans+=1
if(ans != final):
    print(ans)
else:
    print("Final!")

from math import log2
n, a, b = map(int, input().split())
n1= n
final = int(log2(n))
ans = 1
while abs(a-b) > 1 or min(a, b) % 2 == 0:
    if a != 1:
        a//=2
    if(b != 1):
        b//=2
    ans+=1
if(ans != final):
    print(ans)
else:
    print("Final!")

import sys,math
n,a,b=map(int,sys.stdin.readline().split())
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!")

import math

def powerTwo(n):
    power = 0
    while(math.pow(2, power) != n):
        power += 1
    return power

n, a, b = map(int, input().split())
diff = abs(a - b)
rounds = diff // 2 + 1
if (rounds == powerTwo(n)):
    print("Final!")
else:
    print(rounds)

import sys
from math import log
input = sys.stdin.readline
def prog():
    n,a,b = map(int,input().split())
    if a <= n//2 and b > n//2 or a > n//2 and b <= n//2:
        print('Final!')
    else:
        print(int(log(n)/log(2) -1))
prog()

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]]
if(p[1]>p[0]//2  and p[2]>p[0]//2):
	if(abs(p[1]-p[2])==1):
		print(1)
	else:
		count=0
		diff=abs(p[1]-p[2])
		while(diff>=1):
			diff=diff//2
			count=count+1
		if(count==final):
			print("Final!")
		else:
			print(count)
elif(p[1]<=(p[0]//2)  and p[2]<=(p[0]//2)):
	if(abs(p[1]-p[2])==1):
		print(1)
	else:
		count=0
		diff=abs(p[1]-p[2])
		while(diff>=1):
			diff=diff//2
			count=count+1
		if(count==final):
			print("Final!")
		else:
			print(count)
else:
	print("Final!")

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

import math
n,a,b=map(int,input().split());coun=0
nm=int(round(math.log(n,2)))
z=abs(math.ceil(a/2)-math.ceil(b/2))
print([z+1,"Final!"][z+1==nm])

from math import *
n, a, b = map(int, input().split())
a, b = min(a, b), max(a, b)
dist = b - a - 1
ans = 1
while dist > 0:
    ans += 1
    if dist % 2 == 0:
        dist //= 2
    else:
        dist -= (dist + 1) // 2
if ans == log2(n):
    print('Final !')
else:
    print(ans)

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)

n, a, b = map(int, input().split())
q = n
final = 0
while q != 2:
    final += 1
    q /= 2
if a % 2 == 1:
    a += 1
if b % 2 == 1:
    b += 1
if a == b:
    print(1)
    exit(0)
fi = abs(a-b) // 2 + 1
if fi == final:
    print("Final!")
else:
    print(fi)

n, a, b = 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]=[int(x)-1 for x in input().split()]
res=0
while a!=b:
    a//=2
    b//=2
    res+=1
if res==n+1:
    res="Final!"
print(res)

n,a,b = map(int, raw_input().split())
pot = 0
wyn = 1
pot_a = 0
pot_b = 0
while n != 1:
    n = n/2
    pot += 1
pot_a = (a+1)/2
pot_b = (b+1)/2
#print pot_a, pot_b
wyn += abs(pot_a-pot_b)
if wyn == pot:
    print 'Final!'
else:
    print wyn

total_teams,team1,team2 = map(int,input().split())

teams = [x for x in range(total_teams)]
team1-=1
team2-=1
count=1
check=0
if abs(team1-team2)==1:
    print(count)
else:

    while True:
        new_team=[]

        for i in range(0,len(teams)-1,2):

            if teams[i]==team1 or teams[i+1]==team1:
                new_team.append(team1)
            elif teams[i]==team2 or teams[i+1]==team2:
                new_team.append(team2)
            else:
                new_team.append(0)
        teams = new_team
        for i in range(len(teams)-1):
            if team1 == teams[i] and team2 == teams[i+1]:
                check=1
                break
            elif team1 == teams[i+1] and team2 == teams[i]:
                check=1
                break
        if check==1:
            break
        count+=1

    if len(teams)==2:
        print('Final!')
    else:
        print(count+1)

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

v,a,b=list(map(int,input().split()))
c=0
m=True
if a%2==0:
    v-=a-2
    m=False
else:
    v-=a-1
    m=False
if v-b>=2:
    m=False
    if b%2==0:
        v-=v-(b+1)
    else:
        v-=v-(b+2)
if m==True:
    print("Final!")
for i in range(8):
    v/=2
    if v<=2:
        c+=1
        break
    else:
        c+=1
print(c)

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

lista = [i for i in range(1, n+1)]

cont = 0
resp = False
while len(lista) != 2:
    aux = []
    cont += 1
    for i in range(1,len(lista), 2):
        if (lista[i] == a or lista[i] == b) and (lista[i-1] == a or lista[i-1] == b):
            resp = True
            break
        elif lista[i] == a or lista[i] == b: aux.append(i+1)
        elif lista[i-1] == a or lista[i-1] == b: aux.append(i)
        else: aux.append(i)

    lista = aux[:]
    if resp: break

if len(lista) == 2: print "Final!"
else: print cont

import math

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

def main():
    n, a, b = read()
    m = int(math.log(max(a, b) - min(a, b), 2)) + 1
    if 2 ** m == n:
        print('Final!')
    else:
        print(m)

if __name__ == '__main__':
    main()

import math

def powerTwo(n):
    power = 0
    while(math.pow(2, power) != n):
        power += 1
    return power

n, a, b = map(int, input().split())
diff = abs(a - b)
rounds = diff // 2 + 1
if (rounds == powerTwo(n)):
    print("Final!")
else:
    print(rounds)

v,a,b=list(map(int,input().split()))
if ((a<=v/2)and(b<=v/2))or((a>v/2)and(b>v/2)):
    print("Final!")
else:
    c=2
    m=1
    for i in range(8):
        if abs(a-b)<c:
            print(m)
            break
        else:
            c*=2
            m+=1

from math import log, ceil

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

ct = int(ceil(log(abs(a - b), 2))) + 1

print("Final!" if 2 ** ct >= n else ct)

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

n,a,b = [int(i) for i in input().split()]

a -= 1
b -= 1
k = 1

while abs(a - b) != 1:
    a = a // 2
    b = b // 2
    n = n // 2
    k += 1

if n == 2:
    print('Final!')
else:
    print(k)

import math
n,a,b = map(int,input().split())
r=abs(b-a)
t=int(math.log(r,2))+1
if r==1 and max(a,b)%2==0 and t!=math.log(n,2):
	print(1)
elif t==math.log(n,2):

	print("Final!")
else:
	print(t)

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

lista = [i for i in range(1, n+1)]

cont = 1
resp = False

while len(lista) != 2:
    aux = []
    if abs(lista.index(a)-lista.index(b)) == 1:
        resp = True
        break

    cont += 1
    for i in range(1,len(lista), 2):
        if lista[i] == a or lista[i] == b: aux.append(lista[i])
        elif lista[i-1] == a or lista[i-1] == b: aux.append(lista[i-1])
        else: aux.append(lista[i-1])

    lista = aux[:]

if len(lista) == 2: print "Final!"
else: print cont

import math

str_data = input().split()

count = int(str_data[0])
a1 = int(str_data[1])
a2 = int(str_data[2])

k1 = min(a1, a2)
k2 = max(a1, a2)

max_rounds = math.log(count, 2)
res = int(math.log(k2 - k1, 2)) + 1

if res == max_rounds:
    print('Final!')
else:
    print(res)

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

while(n>2):
    cnt += 1
    if(abs(a-b) == 1 and a//2 == b//2):
        break
    if(a%2==1):
        a +=1
    a = a//2
    if(b%2==1):
        b +=1
    b = b//2
    n/=2

if(n==2 and a + b == 3):
    print("Final!")
else:
    print(cnt)

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

command = list(range(1, n + 1))

a, b = min(a, b), max(a, b)

i = 0

while True:
    i += 1
    try:
        if command == [a, b]:
            print('Final!')
            break
        if abs(command.index(b) - command.index(a)) == 1:
            print(i)
            break
    except:
        print(i)
        break
    k = command[::2]
    if a not in k or b not in k:
        k = command[1::2]
    command = k

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:
    #print(z, r, a, b)
    if ((b-a==1)or(a-b==1))and(endd==0):
        #print('end')
        endd = 1
        t = r
        if (z//2==1)or(z//2==0):
            super=1
    z=z//2
    a=a//2
    b=b//2
    r+=1
#print(n, a, b)
if super==1:
    print('Final!')
else:
    print(t)

a=[int(i)for i in input().split()]
b=a[1]
c=a[2]
if b>c:
    c,b=b,c
if a[1]>a[2]:
    a[2],a[1]=a[1],a[2]
if a[0]//2>=b and a[2]>a[0]//2:
    print("Final!")
else:
    if b>c:
        c,b=b,c
    j=1
    while b+1!=c:
        if c<b:
            break
        c=c-j
        b*=2
        j+=1
    print(j)

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
  i*=2
  k+=1
if f==True:
    print(k-1)
else:
    print('Final!')

n,a,b=map(int,input().split())
if abs(a-b)<(n/2):
    print(abs(a-b))
else:
    print("Final!")

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:
        if (2**i)==n:
            print('Final!')
        else:
            print(i)
        exit(0)

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

n,a,b=map(int,input().split())
l,r=0,n
if a>b:
    b,a=a,b
from math import log
ans=int(log(n,2))
x=(l+r)//2
while x:
    if b>x and a<=x:
        break
    ans-=1
    if x<b:
        l=x
    else:
        r=x
    x=(l+r)//2
print(ans if ans**2<n else 'Final!')

import math
n,a,b=map(int,input().split());coun=0
nm=int(round(math.log(n,2)))
z=abs(math.ceil(a/2)-math.ceil(b/2))
print([z+1,"Final!"][z+1==nm])

from math import log, ceil

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

ct = int(ceil(log(abs(a - b) + 1, 2)))

print("Final!" if 2 ** ct == n else ct)

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

print("Final!" if power == round_num + 1 else round_num + 1)

import math
n,a,b = map(int,input().split())
r=abs(b-a)
t=int(math.log(r,2))+1
if r==1 and max(a,b)%2!=0 and t!=math.log(n,2):
	print(1)
elif t==math.log(n,2):

	print("Final!")
else:
	print(t)

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+n//2<b else -n//2
print('Final!' if round==max_round else round)

from math import log, ceil

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

ct = int(ceil(log(abs(a - b), 2))) + 1

print("Final!" if 2 ** ct <= n else ct)

'''input
16 1 9
'''
po2 = [2,4,8,16,32,64,128,256,512]
n,a,b = map(int,raw_input().split())
x = abs(a-b)
ind = -1
for i in range(len(po2)):
	if x < po2[i]:
		ind = i
		break
if n == 1 << (i+1):
	print "Final!"
else:
	print i+1

a,b,c = map(int,input().split())
k = 1 #counter
#iteratively:
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
   print(a,b,c)
if a>2:
    print(k)
else:
    print("Final!")

n,a,b = map(int,input().split())
x = max(a,b)
y = min(a,b)
n = int(n/2)

if y <= n and x> n:
    print("Final!")

else:
    if (x&1 and y&1) or (x&1 == 0 and y&1) or (y&1 == 0 and x&1):
        z= x+y
        while z>n:
            z//=2
        print(z)
    else:
        z= x+y-1
        while z>n:
            z//=2
        print(z)

n, a, b = map(int, input().split())
r = abs(a-b).bit_length()
print('Final!' if r == (n-1).bit_length() else r)

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

import math,sys

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

low = 1
high = n
s = int(math.log(n)) + 1

while low + 0.5 < high:
    if high + low % 2 == 0:
        mid = (high + low + 1) / 2
    else:
        mid = (high + low) / 2

    if min(a,b) < mid and max(a,b) > mid:
        break
    if min(a,b) >= mid:
        low = int(mid)
    elif max(a,b) <= mid:
        high = int(mid)

    s -= 1

if s == int(math.log(n)) + 1:
    print("Final!")
else:
    print(s)

v,a,b=list(map(int,input().split()))
if ((a<=v/2)and(b<=v/2))or((a>v/2)and(b>v/2)):
    print("Final!")
else:
    c=2
    m=1
    for i in range(8):
        if abs(a-b)<c:
            print(m)
            break
        else:
            c*=2
            m+=1

import math

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

def main():
    n, a, b = read()
    m = int(math.log(max(a, b) - min(a, b), 2)) + 1
    if 2 ** m == n:
        print('Final!')
    else:
        print(m)

if __name__ == '__main__':
    main()


# AC
import sys

class Main:
    def __init__(self):
        self.buff = None
        self.index = 0

    def next(self):
        if self.buff is None or self.index == len(self.buff):
            self.buff = self.next_line()
            self.index = 0
        val = self.buff[self.index]
        self.index += 1
        return val

    def next_line(self):
        return sys.stdin.readline().split()

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

    def next_int(self):
        return int(self.next())

    def solve(self):
        n = self.next_int()
        p, t = 0, 1
        r = set()
        s = set()
        r.add(p)
        while (p, t) not in s:
            s.add((p, t))
            p = (p + t) % n
            t = (t + 1) % n
            r.add(p)
        print('YES' if n == len(r) else 'NO')

if __name__ == '__main__':
    Main().solve()

n = int(input())

print('NO' if n & n-1 else 'YES')

n = int(input())
flag = 1
while n > 1:
    if n % 2:
        flag = 0
        break
    n = n // 2
if flag:
    print("YES")
else:
    print("NO")

n = int(input())

def main(n, parity):
    index = 0
    hassocks = [x for x in range(n)]
    for i in range(parity):
        index = (index + i) % n
        if index in hassocks:
            del hassocks[hassocks.index(index)]
    if hassocks == []:
        return 'YES'
    else:
        return 'NO'

if n % 2 == 1:
    print(main(n, n))
else:
    print(main(n, (2 * n)))

n = int(input())
d= {}
for i in range(2*n) :
	a = int((i/2*(i+1))%n)
	if d.setdefault(a) == None :
		d[a] = 1

if len(d) == n :
	print('YES')
else :
	print('NO')

n = int(input())
visited = [False] * n
k = 0
for i in range(n ** 2 + 1):
    k += i + 1
    visited[k % n] = True
for i in visited:
    if not i:
        print("NO")
        exit()
print("YES")

i = int(input())
mods = [0] * i
k = 0
for j in range(i):
  k += j
  mods[k % i] = 1
if all(m == 1 for m in mods):
  print("YES")
else:
  print("NO")

class CodeforcesTask55ASolution:
    def __init__(self):
        self.result = ''
        self.n = 0

    def read_input(self):
        self.n = int(input())

    def process_task(self):
        hassocks = [x + 1 for x in range(self.n)]
        visits = set()
        visiting = 1
        for x in range(1000 * self.n):
            visiting += x
            visiting = visiting % self.n
            if not visiting:
                visiting = self.n
            visits.add(visiting)
        hassocks.sort()
        v = list(visits)
        v.sort()
        if v == hassocks:
            self.result = "YES"
        else:
            self.result = "NO"

    def get_result(self):
        return self.result

if __name__ == "__main__":
    Solution = CodeforcesTask55ASolution()
    Solution.read_input()
    Solution.process_task()
    print(Solution.get_result())

n = int(input())
l = [1]
for i in range(2, 2*n + 1):
    a = l[-1] + i-1
    if a > n:
        a = a%n
    l.append(a)
r = set(l)
if len(r) >= n:
    print("YES")
else:
    print("NO")

n=int(input())
tri=[]
for i in range(2,2009):
    tri.append(i*(i+1)//2)
if n==1:
    print('YES')
    exit()
check=[0]*n
for i in range(2*n+5):
     check[tri[i]%n]=1
if n&(n-1)==0:
    print('YES')
else:
    print('NO')

ka=int(input())
if(ka&(ka-1)>0):
    print("NO")
else:
    print("YES")

n=int(input())
print("NO" if n&(n-1) else "YES")

n=int(input())
tri=[]
for i in range(2,2009):
    tri.append(i*(i+1)//2)
if n==1:
    print('YES')
    exit()
check=[0]*n
for i in range(2*n+5):
     check[tri[i]%n]=1
if sum(check)==n:
    print('YES')
else:
    print('NO')

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
n = int(sys.stdin.readline().strip())
k = 0
a = [False for _ in xrange(n)]
for i in xrange(n + 1):
    a[k] = True
    k = (k + i) % n
for f in a:
    if not f:
        print "NO"
        sys.exit()
print "YES"

import sys
N = int(sys.stdin.readline())
visited = [False]*N
m = 1
cnt = 0
i = 0
while not visited[i]:
    cnt+=1
    m+=1
    visited[i] =  True
    i = (i+m-1)%N
if cnt == N:
    print 'YES'
else:
    print 'NO'

import sys
def readint(): return int(raw_input())

def run():
	n = readint()
	a = [False] * n
	p = 0
	for k in xrange(1000000):
		p += k
		p %= n
		a[p] = True
	print "YES" if all(a) else "NO"
run()

from sys import stdin
di = {}
n = int(stdin.readline())
vis = set()
vis.add(1)
cur = 1
ll = 1
while True:
    u = (cur,ll)
    if di.get(u,0)==1:
        break
    di[u] = 1
    cur = (cur+ll)%n
    if cur ==0:
        cur = n
    vis.add(cur)
    ll  = (ll+1)%n;
if len(vis)==n:
    print "YES"
else:
    print "NO"

n=input()
a={}
p=0
for i in range(n):
	p=(p+i)%n
	a[p]=1
print'YES'if n==len(a)else'NO'

#
# Flea
#

#N = 1
N = int( raw_input() )
visited = [ False ] * N
mods = [ -1 ] * N
i = 0
step = 1
v_count = 0
while v_count < N :
	if visited[ i % N ] == False :
		v_count += 1
		visited[ i % N ] = True
		mods[ i % N ] = step % N
	else :
		if mods[ i % N ] == step % N : break
	i += step
	step += 1
if v_count == N : print "YES"
else : print "NO"

n = int(raw_input())
z = 0
K = [0] * n

k = 0
x = 0
while x <= 1000:
    k += x
    while k >= n:
        k = k - n
    K[k] = 1
    x += 1
if 0 in K:
    print 'NO'
else:
    print 'YES'

n = int(raw_input())
K = [0] * n

k = 0
x = 0
while x <= 2*n:
    k += x
    while k >= n:
        k = k - n
    K[k] = 1
    x += 1
if 0 in K:
    print 'NO'
else:
    print 'YES'

n=int(raw_input())
i=1%n
k=2%n
v=[set() for j in range(n)]
v[0].add(1)
while (k not in v[i]):
	v[i].add(k)
	i=(i+k)%n
	k=(k+1)%n

for x in v:
	if len(x)==0:
		print 'NO'
		exit(0)
print 'YES'

n = int(raw_input())
a = [False] * n
c = 0

for k in xrange(n*n):
    a[c] = True
    c = (c + k + 1) % n

if False in a:
    print 'NO'
else:
    print 'YES'

# -*- coding: utf-8 -*-

def solve(n):
	visited = [False]*n
	cur = 0
	for step in range(0, n):
		cur = (cur+step)%n
		visited[cur] = True
	return reduce(lambda x, y: x and y, visited)

n = int(raw_input())

print 'YES' if solve(n) else 'NO'

n=input()
l=[0 for _ in range(n)]
m=0
for i in range(2*n):
    m=(m+i)%n
    l[m]=1
print 'NO' if l.count(0) else 'YES'

n = input()
print ['NO', 'YES'][len(set(i * (i + 1) / 2 % n for i in range(n * 2))) == n]

#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import sys
input = sys.stdin
output = sys.stdout

def solve(n):
    visited = [False]*n
    visited[0] = True
    pos = 0
    for i in range(1,2*n+1):
        pos += i
        pos %= n
        visited[pos] = True
    for v in visited:
        if not v:
            return 'NO'
    return 'YES'

def numbers_from_line(d=' '):
    return [int(s) for s in input.readline().strip().split(d) if len(s.strip())>0]

n = int(input.readline())

a = solve(n)
output.write('%s\n' % a)

n=int(input())
L=[1]
for k in range(1,n):
    if((L[len(L)-1]+k)==n):
        L.append(L[len(L)-1]+k)
    else:
        L.append((L[len(L)-1]+k)%n)
L=list(set(L))
if(len(L)==n):
    print("YES")
else:
    print("NO")

n = int(input())
jumped = [ [ False for j in range(n) ] for i in range(n) ]
seen = [ False for i in range(n) ]
seen[0] = True
count = 1
span = 0
pos = 0
while True:
	pos = (pos + span + 1) % n
	if seen[pos]:
		if jumped[pos][span]:
			break
	else:
		seen[pos] = True
		count += 1
	jumped[pos][span] = True
	span = (span + 1) % n

if count == n:
	print('YES')
else:
	print('NO')

n=int(input())
a=set()
i=0
step=1
for _ in range(2*n):
    a.add(i%n)
    i+=step
    step+=1
if len(a)==n:
    print("YES")
else:
    print("NO")

from itertools import *
import math

n = input()
if n in [2**i for i in xrange(11)]:
    print "YES"
else:
    print "NO"

from itertools import *

N = int(raw_input())

data = list(repeat(False, N))

data[0] = True

pos = 0
for i in range(N * 200):
  pos += i
  pos %= N
  data[pos] = True

if all(data):
  print 'YES'
else:
  print 'NO'

# submit
n = int(raw_input())
c = 0
v = [0] * n
for i in range(1000000):
    c = (c + i) % n
    v[c] = 1
print "NO" if v.count(0) else "YES"

#!/usr/bin/python
n = int(raw_input())
if n in [2 **k for k in range(10)]:
    print "YES"
else:
    print "NO"

x = int( input() )
print( "NO" if x & x-1 > 0 else "YES" )

import math, time, re

rInt = lambda s: int(s)
rFloat = lambda s: float(s)
rLong = lambda s: long(s)
rLine = lambda f: f.readline()

def main():
    def body():
        n = int(raw_input())
        b = [True for i in xrange(0, n)]
        j = 0
        i = 1
        while ((i <= 500000)):
            if (b[j]):
                b[j] = False
            i += 1
            j = (j + i) % n
        x = [a for a in b if a == True]
        if (len(x) == 0):
            return 'YES'
        else:
            return 'NO'

    try:
        name = ''
        f1 = open(name + '.in', 'r')
        f2 = open(name + '.out', 'w')
        print >> f2, body()
        f1.close()
        f2.close()
    except IOError:
        print body()
    except:
        print 'Sudden error!'
        raise

start = time.time()
main()
#print 'Time exceeded:', time.time() - start

n=int(input())
list1=[]
c=2;
k=2;
if(n==1 or n==2):
    print("YES")
    exit(0)
else:
    list1.append(2);
    for i in range(n-1):
        c=c+k
        if(c%n==0):
            list1.append(n)
            c=n;
            k=k+1
        else:
            list1.append(c%n)
            c=c%n
            k=k+1

list2=set(list1)
if((len(list2)==n-1 and list1.count(1)==0) or len(list2)==n):
    print("YES")
else:
    print("NO")

n = int(raw_input())
ans = [False for i in xrange(n + 1)]
k = 1
for i in xrange(n):
    k = (k + i) % n;
    ans[k] = True
print 'YES' if ans.count(True) == n else 'NO'

from math import log
a = int(input())
t = log(a, 2)
if len(str(t)) == 3:
    print('YES')
else:
    print('NO')

n=int(input())
print('NO'if n&n-1 else 'YES')

n = int(input())
l = [0 for _ in range(n)]

pos = 0
for i in range(2 * n + 1):
	pos += i
	if pos >= n:
		pos %= n
	l[pos] = 1

if len(set(l)) == 2:
	print('NO')
else:
	print('YES')

from itertools import *
from fractions import *
import sys
n, pos, k = input (), 1, 1
used = [False for _ in range (n)]
for _ in range (2 * n):
    used[pos - 1] = True
    pos = n if (pos + k) % n == 0 else (pos + k) % n
    k += 1
print 'YES' if used.count (True) == n else 'NO'

def f(n):
    rl = [True]*n   #True = nonvisited
    nn = (n*(n-1))//2
    for k in range(n):
        kk = (k*(k+1))//2
        rl[kk%n] = False
        if n%2==0:
            rl[(kk+nn)%n] = False
    return sum(rl)==0

n = int(input())
print('YES' if f(n) else 'NO')

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

import sys
import math

n = int(sys.stdin.readline())

v = [0] * n
ost = 1
for i in range(1, n + 1):
    ost = (ost + i) % n
    v[ost] = 1

for i in v:
    if(i == 0):
        print("NO")
        exit()

print("YES")

x = int( input() )
print( "YES" if x % 2 == 0 or x == 1 else "NO" )

n=int(input())
list1=[]
c=2;
k=2;
if(n==1 or n==2):
    print("YES")
    exit(0)
else:
    list1.append(2);
    for i in range(n-1):
        c=c+k
        if(c%n==0):
            list1.append(n)
            c=n;
            k=k+1
        else:
            list1.append(c%n)
            c=c%n
            k=k+1

list2=set(list1)
if(len(list2)>=n-1):
    print("YES")
else:
    print("NO")

n=int(input())
list1=[]
c=2;
k=2;
if(n==1):
    print("YES")
    exit(0)
else:
    list1.append(2);
    for i in range(n-1):
        c=c+k
        if(c%n==0):
            list1.append(n)
            c=n;
            k=k+1
        else:
            list1.append(c%n)
            c=c%n
            k=k+1

list2=set(list1)
if(len(list2)==n):
    print("YES")
else:
    print("NO")

n=int(input())
list1=[]
c=2;
k=2;
if(n==1 or n==2):
    print("YES")
    exit(0)
else:
    list1.append(2);
    for i in range(n-1):
        c=c+k
        if(c%n==0):
            list1.append(n)
            c=n;
            k=k+1
        else:
            list1.append(c%n)
            c=c%n
            k=k+1

list2=set(list1)
if(len(list2)==n):
    print("YES")
else:
    print("NO")

a=int(input())
if a<4:
        if (a==1 or a==2):
                print("YES")
        else:
                print("NO")
else:
        if (a%4==0 and a%3!=0):
                print("YES")
        else:
                print(" NO")

a=int(input())
if a==1:
        print(" YES")
else:
        if a%2!=0 :
                print("NO")
        else:
                b=bin(a)
                z=b.count("1")
                if z%2==0:
                        print("NO")
                else:
                        print("YES")

a=int(input())
b=bin(a)
z=b.count("1")
if z%2==0:
        print("NO")
else:
        print("YES")

n = int(input())
l = [0 for _ in range(n)]

pos = 0
for i in range(2 * n + 1):
	pos += i
	if pos >= n:
		pos %= n
	l[pos] = 1

if len(set(l)) == 2:
	print('no')
else:
	print('yes')

n = int(input())
x = [0]*n
sum_ = 0
last = 0
for i in range(n+1):
    x[sum_%n] = 1
print("YES" if x == [1]*n else "NO")

n=int(input())

m=1
p=1
s = { 1 }
while( 1 ):
	if (m%n==1 and p==1) or len(s)==n:
		break
	p = ( p+(m) )%n
	s.add(p)
	m+=1
	print( s )

if len(s)==n:
	print("YES")
else:
	print("NO")

n = int(input())
a = [None] + [0 for i in range(n)]
a[1] = 1
k = 1
c = 0
cur = 1
#print(a)
for i in range(1000):
    cur = (cur + k) % n
    a[cur] = 1
    k += 1
if a.count(0) == 0:
    print("YES")
else:
    print("NO")

n=int(input())
tri=[]
for i in range(2,1000):
    tri.append(i*(i+1)//2)
if n==1:
    print('YES')
    exit()
if n in tri:
    print('YES')
else:
    print('NO')

n=int(input())
tri=[]
for i in range(2,1000):
    tri.append(i*(i+1)//2)
if n==1:
    print('YES')
    exit()
if n in tri:
    print('NO')
else:
    print('YES')

n=int(input())
tri=[]
for i in range(2,1000):
    tri.append(i*(i+1)//2)
if n==1:
    print('YES')
    exit()
if n%3==0:
    print('NO')
else:
    print('YES')

n=int(input())
tri=[]
for i in range(2,1000):
    tri.append(i*(i+1)//2)
if n==1:
    print('YES')
    exit()
if n ==3:
    print('NO')
else:
    print('YES')

n = int(input())
l = list(range(1,n+1))
k = 1
l.remove(1)
oflag = 0
for k in range(n+1):
    if len(l) == 0:
        print 'YES'
        oflag = 1
        break
    x = (((k*(k+1))/2)+1)%n
    if x in l:
        l.remove(x)
        k = k+1
if oflag == 0:
    print 'NO'

n = int(input())
l = list(range(1,n+1))
k = 1
l.remove(1)
while 1:
    if len(l) == 0:
        print 'YES'
        break
    x = (((k*(k+1))/2)+1)%n
    if x in l:
        l.remove(x)
        k = k+1
    else :
        print 'NO'
        break

import math, time, re

rInt = lambda s: int(s)
rFloat = lambda s: float(s)
rLong = lambda s: long(s)
rLine = lambda f: f.readline()

def main():
    def body():
        n = int(raw_input())
        b = [True for i in xrange(0, n)]
        j = 0
        i = 1
        while ((i <= 500000)):
            if (b[j]):
                b[j] = False
            i += 1
            j = (j + i) % n
        x = [a for a in b if a == True]
        if (len(x) == 0):
            return 'YES'
        else:
            return 'NO'

    try:
        name = ''
        f1 = open(name + '.in', 'r')
        f2 = open(name + '.out', 'w')
        print >> f2, body()
        f1.close()
        f2.close()
    except IOError:
        print body()
    except:
        print 'Sudden error!'
        raise

start = time.time()
main()
print 'Time exceeded:', time.time() - start

import sys

inf = sys.stdin
out = sys.stdout

infinity = pow(10,9)
n = int(inf.readline().rstrip())
a = [False] * n
q = [-1] * (2 * n)
q[0] = 0
d = [infinity] * n
d[0] = 0
left, right = 0, 1
while left != right:
  i = q[left]
  left += 1
  k = d[i] + 1
  for j in [ (i + k) % n, (i + n - k) % n] :
    if d[j] != infinity: continue
    d[j] = d[i] + 1
    q[right] = j
    right += 1
if left == n:
  out.write('YES\n')
else:
  out.write('NO\n')

n = int(input())
visited = [False] * n
k = 0
for i in range(n + 1):
    k += i + 1
    visited[k % n] = True
for i in visited:
    if not i:
        print("NO")
        exit()
print("YES")

class CodeforcesTask55ASolution:
    def __init__(self):
        self.result = ''
        self.n = 0

    def read_input(self):
        self.n = int(input())

    def process_task(self):
        hassocks = [x + 1 for x in range(self.n)]
        visits = set()
        visiting = 1
        for x in range(1000 * self.n):
            visiting += x
            visiting = visiting % self.n
            if not visiting:
                visiting = self.n
            visits.add(visiting)
        if list(visits) == hassocks:
            self.result = "YES"
        else:
            self.result = "NO"

    def get_result(self):
        return self.result

if __name__ == "__main__":
    Solution = CodeforcesTask55ASolution()
    Solution.read_input()
    Solution.process_task()
    print(Solution.get_result())