#0 -> iterative; 1 -> recursive
flag = 1

def it_fibo(n):
	cnt = 1
	f0 = 1
	f1 = 1
	while cnt != n:
		cnt += 1
		f = f0 + f1
		#print("f"+str(cnt), f)
		f0 = f1
		f1 = f
	return f1

def re_fibo(n):
	if n == 1:
		return 1
	if n == 0:
		return 1
	else:
		return re_fibo(n-1) + re_fibo(n-2)

n = int(input())

if flag == 0:
	print(it_fibo(n))
else:
	print(re_fibo(n))
a3282e1862e6d8e25fe8c1ba3328277797698e0d
<mask token>

<mask token>


def it_fibo(n):
    cnt = 1
    f0 = 1
    f1 = 1
    while cnt != n:
        cnt += 1
        f = f0 + f1
        f0 = f1
        f1 = f
    return f1


def re_fibo(n):
    if n == 1:
        return 1
    if n == 0:
        return 1
    else:
        return re_fibo(n - 1) + re_fibo(n - 2)


<mask token>

<mask token>


def it_fibo(n):
    cnt = 1
    f0 = 1
    f1 = 1
    while cnt != n:
        cnt += 1
        f = f0 + f1
        f0 = f1
        f1 = f
    return f1


def re_fibo(n):
    if n == 1:
        return 1
    if n == 0:
        return 1
    else:
        return re_fibo(n - 1) + re_fibo(n - 2)


<mask token>
if flag == 0:
    print(it_fibo(n))
else:
    print(re_fibo(n))

flag = 1


def it_fibo(n):
    cnt = 1
    f0 = 1
    f1 = 1
    while cnt != n:
        cnt += 1
        f = f0 + f1
        f0 = f1
        f1 = f
    return f1


def re_fibo(n):
    if n == 1:
        return 1
    if n == 0:
        return 1
    else:
        return re_fibo(n - 1) + re_fibo(n - 2)


n = int(input())
if flag == 0:
    print(it_fibo(n))
else:
    print(re_fibo(n))

#0 -> iterative; 1 -> recursive
flag = 1

def it_fibo(n):
	cnt = 1
	f0 = 1
	f1 = 1
	while cnt != n:
		cnt += 1
		f = f0 + f1
		#print("f"+str(cnt), f)
		f0 = f1
		f1 = f
	return f1

def re_fibo(n):
	if n == 1:
		return 1
	if n == 0:
		return 1
	else:
		return re_fibo(n-1) + re_fibo(n-2)

n = int(input())

if flag == 0:
	print(it_fibo(n))
else:
	print(re_fibo(n))