Problem:
 Score : 200 points    Problem Statement It is November 18 now in Japan. By the way, 11 and 18 are adjacent Lucas numbers.  You are given an integer N . Find the N -th Lucas number.  Here, the i -th Lucas number L_i is defined as follows:   L_0=2  L_1=1  L_i=L_{i-1}+L_{i-2} (i≥2)       Constraints  1≤N≤86  It is guaranteed that the answer is less than 10^{18} .  N is an integer.         Input Input is given from Standard Input in the following format:  N       Output Print the N -th Lucas number.        Sample Input 1 5      Sample Output 1 11   L_0=2  L_1=1  L_2=L_0+L_1=3  L_3=L_1+L_2=4  L_4=L_2+L_3=7  L_5=L_3+L_4=11   Thus, the 5 -th Lucas number is 11 .       Sample Input 2 86      Sample Output 2 939587134549734843

Solution (Python):
n = int(input())

if n == 1:
  print(1)
else:
  a, b = 2, 1
  for i in range(n - 1):
    a, b = b, a + b
  print(b)

Solution (Python):
n = int(input())
i = [0 for _ in range(87)]
i[0]=2
i[1]=1
for s in range(2,87):
    i[s] = i[s-1]+i[s-2]
print(i[n])

Solution (Python):
n = int(input())
a, b = 2, 1
for i in range(n):
    a, b = b, a+b
print(a)

Solution (Python):
n = int(input())

list = [2, 1]
for i in range(2, n+1):
    new = list[i-2]+list[i-1]
    list.append(new)

print(list[n])

Solution (Python):
import sys


def solve():
    sys.setrecursionlimit(2000)
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    n = int(input().rstrip('\n'))
    ls = [0] * (n + 1)
    ls[0] = 2
    ls[1] = 1
    for i in range(2, len(ls)):
        ls[i] = ls[i-1] + ls[i-2]
    print(ls[-1])


if __name__ == '__main__':
    solve()

Solution (Python):
a,b=2,1
for i in range(int(input())):
  a,b=b,(a+b)
print(a)

Solution (Python):
n = int(input())
list_l = [2, 1]
for i in range(2, n+1):
  new_l = list_l[i-2] + list_l[i-1]
  list_l.append(new_l)
print(list_l[-1])

Solution (Python):
N = int(input())
L = [2,1]
if N > 1:
    for i in range(2,N+1):
        L.append(L[i-1]+L[i-2])
print(L[N])

Solution (Python):
N = int(input())
memo = []
for i in range(N):
    if i == 0:
        memo.append(2)
    elif i == 1:
        memo.append(1)
    else:
        memo.append(memo[i-1] + memo[i-2])
if N == 1:
    print(1)
else:
    print(memo[N - 1] + memo[N - 2])

Solution (Python):
N=int(input())
a=[]
for j in range(N+1):
  if j==0:
    a.append(2)
  elif j==1:
    a.append(1)
  else:
    a.append(a[j-1]+a[j-2])
print(a[N])

Solution (Python):
a,b = 2,1
for _ in range(int(input())):
  a,b = b,a+b  
print(a)

Solution (Python):
N = int(input())

List = [2,1]

for i in range(N-1):
  List.append(List[i]+List[i+1])

Answer = List[-1]
print(Answer)

Solution (Python):
n=int(input())
a=2
b=1

for i in range(n-1):
  temp=a+b
  a=b
  b=temp
if n==0:
  print(2)
elif n==1:
  print(1)
else:
  print(b)

Solution (Python):
n = int(input())

luc = [2, 1]

for i in range(2, n + 1):
    luc.append(luc[i-1] + luc[i-2])
print(luc[n])

Solution (Python):
N = int(input())

L = [2, 1, 3]

if N <= 2:
  print(L[N])
  exit()

for i in range(3, N+1):
  j = i % 3
  L[j] = sum(L) - L[j]
  
  if i == N:
    print(L[j])

Solution (Python):
n = int(input())
l = [0] * (n+1)
l[0] = 2
l[1] = 1

for i in range(2, n+1):
    l[i] = l[i-1] + l[i-2]
print(l[n])

Solution (Python):
n = int(input())

l = [2, 1]
for _ in range(n-1):
    t = l[1] + l[0]
    l.append(t)
    l.pop(0)
print(l[1])

Solution (Python):
n = int(input())
L = [0 for i in range(100)]
L[0] = 2
L[1] = 1
def Lucas(n):
    if L[n] != 0:
        return L[n]
    else:
        L[n - 1] = Lucas(n - 1)
        L[n - 2] = Lucas(n - 2)
        return L[n - 1] + L[n - 2]
print(Lucas(n))

Solution (Python):
N=int(input())
memo=[None]*(N+1)
def luca(N):
  if memo[N]!=None:
    return memo[N]
  if N==0:
    memo[N]=2
    return 2
  elif N==1:
    memo[N]==1
    return 1
  else:
    memo[N]=luca(N-1)+luca(N-2)
    return memo[N]
ans=luca(N)
print(ans)

Solution (Python):
N=int(input())
l=2
r=1
for i in range(N-1):
    tmp=r
    r+=l
    l=tmp
print(r)

Solution (Python):
n = int(input())
l_i_1 = 2
l_i_2 = 1
if n >= 2:
  while n>=2:
    l_i = l_i_1 + l_i_2
    n -= 1
    l_i_1= l_i_2
    l_i_2 = l_i
  print(l_i)
elif n==1:
  print(1)
else:
  print(2)

Solution (Python):
def resolve():
	l=[2,1]
	for i in range(2,87):
		l+=[l[i-1]+l[i-2]]
	print(l[int(input())])
resolve()

Solution (Python):
n = int(input())

lucas_list = [0] * 90
lucas_list[0] = 2
lucas_list[1] = 1

def lucas_num(n):
    if n == 0:
        return 2
    elif n == 1:
        return 1
    elif lucas_list[n] == 0:
        lucas_list[n] = lucas_num(n-1) + lucas_num(n-2)
        return lucas_list[n]
    else:
        return lucas_list[n]

print(lucas_num(n))

Solution (Python):
n = int(input())

fib = [2] + [1] + [0]*(n-1)

for i in range(2, n+1):
	fib[i] = fib[i-1] + fib[i-2]

print(fib[n])

Solution (Python):
n = int(input())
l1 = 2
l2 = 1
if n==0:
  print(l1)
elif n==1:
  print(l2)
else:
  for i in range(n-1):
    result = l1+l2
    l1 = l2
    l2 = result
  print(result)

Solution (Python):
n=int(input())
a=[2,1]
for i in range(n-1):
    b=a[i]+a[i+1]
    a.append(b)
print(a[-1])

Solution (Python):
n=int(input())
a,b=2,1
for i in range(2,n+1):
	c=a+b
	a,b=b,c
print(c if n!=1 else 1)

Solution (Python):
n = int(input())
a, b = 2, 1

for _ in range(n-1):
    a, b = b, a+b

print(b)

Solution (Python):
n=int(input())
l=[2,1]
for i in range(2,n+1):
  l.append(l[i-1]+l[i-2])
print(l[-1])

Solution (Python):
N = int(input()) - 1
L0 = 2
L1 = 1
for i in range(N):
	temp = L1
	L1 = L0 +L1    
	L0 = temp
print(L1)

Solution (Python):
n=int(input())
l0,l1=2,1
for i in range(n):
    l0,l1=l1,l0+l1
print(l0)

Solution (Python):
N=int(input())
L=[2,1]
for n in range(2,N+1):
  L.append(L[n-1]+L[n-2])
print(L[-1])

Solution (Python):
N=int(input())
if N==0:
  print(2)
elif N==1:
  print(1)
else:
  dp=[0]*(N+1)
  dp[0]=2
  dp[1]=1
  for i in range(2,N+1):
    dp[i]=dp[i-1]+dp[i-2]
  print(dp[N])

Solution (Python):
N = int(input())
L0 = 2
L1 = 1

if N == 0:
  print(L0)
elif N == 1:
  print(L1)
else:
  for i in range(N - 1):
    L1, L0 = L0 + L1, L1
  print(L1)

Solution (Python):
n = int(input())

memo = [0 for i in range(n+1)]


def luca(i):
    if i == 0:
        memo[i] = 2
        return memo[i]
    if i == 1:
        memo[i] = 1
        return memo[i]
    if memo[i] != 0:
        return memo[i]
    memo[i] = luca(i-1) + luca(i-2)
    return memo[i]


print(luca(n))

Solution (Python):
n = int(input())
luca = [0]*100
luca[0] = 2
luca[1] = 1
for i in range(1,n):
  luca[i+1] = luca[i] + luca[i-1]
print(luca[n])

Solution (Python):
N = int(input())
L = [0]*(N+2)
L[0] = 2
L[1] = 1
for i in range(2,N+2):
    L[i] = L[i-1]+L[i-2]
print(L[N])

Solution (Python):

N = int(open(0).read())
L0 = 2
L1 = 1
L2 = 3
for i in range(N):
    L2 = L1 + L0
    L1, L0 = L2, L1
    
print(L0)

Solution (Python):
N = int(input())
ans = [0]*87
ans[0] = 2
ans[1] = 1 
for i in range(2,N+1):
  ans[i] = ans[i-2]+ans[i-1]
print(ans[N])

Solution (Python):
memo = {}
def L(n):
    if n==0:
        return 2
    elif n==1:
        return 1
    elif n in memo:
        return memo[n]
    memo[n] = L(n-1)+L(n-2)
    return memo[n]
print(L(int(input())))

Solution (Python):

N = int(input())

L = [0]*(N+1)
L[0] = 2
L[1] = 1
for i in range(2,N+1):
    L[i] = L[i-1]+L[i-2]

print(L[N])

Solution (Python):
n = int(input())
l=[0]*100
l[0]=2
l[1]=1
def ryuka(x):
    r = 0
    for i in range(2,x+1):
        l[i]=l[i-1]+l[i-2]
    return l[i]
if n==1:
    print(1)
    exit()
else:
    print(ryuka(n))

Solution (Python):
N = int(input())
luca = [2, 1]

for i in range(101):
    luca.append(luca[i]+luca[i+1])

print(luca[N])

Solution (Python):
N =int(input())
L = [2,1]
if N==1:
    print(1)
else:
    for i in range(N-1):
        Li = L[i]+L[i+1]
        L.append(Li)
    print(L[N])

Solution (Python):
N=int(input())
prev=2
now=1

for i in range(N-1):
  prev,now=now,now+prev
print(now)

Solution (Python):
n = int(input())

memo = [-1]*(n+1)
memo[0] = 2
memo[1] = 1
for i in range(2, n+1):
   memo[i] = memo[i-1] + memo[i-2]

print(memo[n])

Solution (Python):
N = int(input())
if N == 1:
    print(1)
else:
    a0 = 2
    a1 = 1
    for n in range(2,N+1):
        a2 = a1 + a0
        a0,a1 = a1,a2
    print(a2)

Solution (Python):
N = int(input())

L = [2, 1]

for i in range(2, N+1):
    L.append(L[i-2] + L[i-1])

print(L[N])

Solution (Python):
import sys
from functools import reduce
import copy
import math
from pprint import pprint
import collections


sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def int_inputs(num_of_input):
    ins = [int(input()) for i in range(num_of_input)]
    return ins


def solve(inputs):
    N = int(inputs[0])
    lucas_numbers = [2, 1]
    for i in range(2, N+1):
        lucas_numbers.append(lucas_numbers[i-2] + lucas_numbers[-1])
    return lucas_numbers[-1]


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

Solution (Python):
N=int(input())
def lucasnum(N):
    l=[2,1]
    if N>1:
        for n in range(2, N+1):
            l.append(l[n-1]+l[n-2])
    return print(l[N])
lucasnum(N)

Solution (Python):
a,b=2,1
for i in range(int(input())):a,b=b,a+b
print(a)

Solution (Python):
l=[2,1]
n=int(input())
for i in range(n):
    l.append(l[i]+l[i+1])
print(l[n])

Solution (Python):

if __name__=="__main__":
    N=int(input())
    L=[2,1]
    for i in range(2,N+1):
        L.append(L[i-1]+L[i-2])
    print(L[N])

Solution (Python):
d = dict()


def lucas(i: int):
    if i == 0:
        return 2
    if i == 1:
        return 1
    if i in d:
        return d[i]
    val = lucas(i - 1) + lucas(i - 2)
    d[i] = val
    return val


print(lucas(int(input())))

Solution (Python):
def FibArray(n):
    FA = [0]*n
    FA[0] = 2
    FA[1] = 1
    for i in range(2,n):
        FA[i] = (FA[i-1]+FA[i-2])
    return(FA)

def Fib(n):
    return(FibArray(n+1)[n])

print(Fib(int(input())))

Solution (Python):
N = int(input())
L = [2,1]
for n in range(N-1):
  L.append( L[-2]+L[-1] )
print(L[-1])

Solution (Python):
n = int(input())
l_0 = 2; l_1 = 1; l_n = 3
for i in range(n):
  l_0, l_1, l_n = l_1, l_n, (l_1 + l_n)
print(l_0)

Solution (Python):
n=int(input())

a=[2,1]
for i in range(2,n+1):
    b=a[i-2]+a[i-1]
    a.append(b)
        
        
print(a[-1])

Solution (Python):
n = int(input())
L = [2,1]
for i in range(2,n+1):
    L += [L[-1]+L[-2]]
print(L[-1])

Solution (Python):
n =int(input())

L=[]
L.append(2)
L.append(1)


def Lucas(n):
    for i in range(n):
        cnt=len(L)
        tmp=L[cnt-2]+L[cnt-1]
        L.append(tmp)

Lucas(n)

print(L[n])

Solution (Python):
N = int(input())

a, b = 2, 1
for i in range(N-1):
  a, b = b, a+b
  
print(b)

Solution (Python):
n = int(input())
l0,l1 = 2,1
for i in range(n):
  l0,l1 = l1,(l0+l1)
print(l0)

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    ls = [0] * (n + 1)
    ls[0] = 2
    ls[1] = 1
    for i in range(2, len(ls)):
        ls[i] = ls[i-1] + ls[i-2]
    print(ls[-1])


if __name__ == '__main__':
    slove()

Solution (Python):
l0,l1=2,1

for i in range(int(input())):
    l0,l1=l1,l0+l1

print(l0)

Solution (Python):
dp = [2,1]
N = int(input())
if(N==1):
    print(1)
else:
    for i in range(2,N+1):
        dp.append(dp[-1]+dp[-2])
    print(dp[-1])

Solution (Python):
N = int(input())
L0 = 2
L1 = 1
for i in range(N-1):
    L2 = L1+L0
    L0 = L1
    L1 = L2
print(L1)

Solution (Python):
L = [2 if i==0 else 1 for i in range(100)]
for n in range(2,100):
	L[n] = L[n-1]+L[n-2]
print(L[int(input())])

Solution (Python):

l = [2,1]
for i in range(2,100):
  a = l[i-2]+l[i-1]
  l.append(a)
print(l[int(input())])

Solution (Python):
n = int(input())

l_1, l_2 = 2, 1

for _ in range(n-1):
  l_1, l_2 = l_2, l_1+l_2

print(l_2)

Solution (Python):
l=[1,3]
for i in range(84):
    l.append((l[i]+l[i+1]))
print(l[int(input())-1])

Solution (Python):
N = int(input())
L_forward = 2
L_backward = 1
if N == 1:
    print(L_backward)
else:
    for i in range(2, N+1):
        L = L_forward + L_backward
        L_forward = L_backward
        L_backward = L
    print(L)

Solution (Python):
n = int(input())
a = 2
b = 1
if n == 0:
    print(2)
elif n == 1:
    print(1)
else:
    for i in range(n - 1):
        c = a + b
        a = b
        b = c
    print(c)

Solution (Python):
def lu(n):
    a, b = 2, 1
    for i in range(n):
        a, b = b, a + b
    return a
print(lu(int(input())))

Solution (Python):
import math
import sys
input = sys.stdin.readline


def main():
    N = int(input())   
    L = [0]*(N+1)
    L[0] = 2
    L[1] = 1

    for i in range(2, N+1):
        L[i] = L[i-1] + L[i-2]
    
    print(L[N])


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
dp =[0 for i in range(n+1)]
for i in range(n+1):
    if i == 0:
        dp[i] = 2
    elif i == 1:
        dp[i] = 1
    else:
        dp[i] = dp[i-1] + dp[i-2]
print(dp[n])

Solution (Python):
n = int(input())
ans = [0] * (n + 1)
ans[0] = 2
ans[1] = 1
for i in range(2, n + 1):
    ans[i] = ans[i - 2] + ans[i - 1]
print(ans[n])

Solution (Python):
n = int(input())

l = []
for i in range(n+1):
    if i == 0:
        l.append(2)
    if i == 1:
        l.append(1)
    if i > 1:
        l.append(l[i-1] + l[i-2])

print(l[n])

Solution (Python):
N = int(input())

L = [0]*(N+1)
L[0]=2
L[1]=1

for i in range(2, N+1):
    L[i] = L[i-1] + L[i-2]
print(L[N])

Solution (Python):
N = int(input())

L = [2,1]
for i in range(100):
  L.append(L[-1]+L[-2])
print(L[N])

Solution (Python):
n = int(input())
li = [0]*(n+1)
li[0] = 2
li[1] = 1

for i in range(2,n+1):
    li[i] = li[i-2] + li[i-1]
   
print(li[n])

Solution (Python):
n=int(input())

l=[2,1]
for i in range(2,87):
    l.append(l[i-2]+l[i-1])
print(l[n])

Solution (Python):
N = int(input())
x = [2, 1]

for i in range(2, 87):
  x.append(x[i-1]+x[i-2])
  
print(x[N])

Solution (Python):
n = int(input())
ans = [2,1]
for i in range(2,n+1):
    ans.append(ans[i-1]+ans[i-2])
print(ans[n])

Solution (Python):



N = int(input())


l = [0] * (N + 1)
l[0] = 2
l[1] = 1
for i in range(2, N + 1):
    l[i] = l[i - 1] + l[i - 2]


print(l[-1])

Solution (Python):
n=int(input())
l=[2,1]
if n==1:
    print('1')
    exit()
else:
    for i in range(2,n+1):
        l.append(l[i-1]+l[i-2])
print(l[-1])

Solution (Python):
L=[2,1]
for i in range(2,100):
  L.append(L[i-2]+L[i-1])

print(L[int(input())])

Solution (Python):
n=int(input())
L=[0 for _ in range(n+1)]
L[0]=2
L[1]=1
for i in range(n-1):
    L[i+2]=L[i+1]+L[i]
print(L[n])

Solution (Python):
N = int(input())

prepre_L = 2
pre_L = 1
now_L = 0
if N == 0:
    now_L =2
elif N == 1:
    now_L = 1
else:
    for n in range(N - 1):
        now_L = pre_L + prepre_L
        prepre_L = pre_L
        pre_L = now_L

print(now_L)

Solution (Python):
n = int(input())
L = [0] * (n + 1)
L[0] = 2
L[1] = 1
for i in range(2, n + 1):
    L[i] = L[i - 1] + L[i - 2]

print(L[n])

Solution (Python):
N = int(input())

L = [0]*88

L[0] = 2
L[1] = 1

for i in range(2,87):
    L[i] = L[i-2] + L[i-1]

print(L[N])

Solution (Python):
N = int(input())

L_old1 = 2
L_old2 = 1

if N == 1:
    L_new = L_old2
else:
    for i in range(2,N+1):
         L_new = L_old1 + L_old2
         L_old1 = L_old2
         L_old2 = L_new

print(L_new)

Solution (Python):
a,b=2,1
for i in range(int(input())):
    a,b=b,(a+b)
print(a)

Solution (Python):
N = int(input())
L = [2, 1]

for i in range(N - 1):
    L.append(L[i] + L[i + 1])

print(L[-1])

Solution (Python):
n = int(input())

if n == 1:
  print(1)
else:
  a, b = 2, 1
  for i in range(n - 1):
    a, b = b, a + b
  print(b)

Solution (Python):
def lucas(n):
    if n == 0:
        return 2
    elif n == 1:
        return 1
    return lucas(n - 1) + lucas(n - 2)
    
n = int(input())
lucas = [0 for i in range(87)]
lucas[0] = 2
lucas[1] = 1
for i in range(2, n + 1):
    lucas[i] = lucas[i - 1] + lucas[i - 2]
print(lucas[n])

Solution (Python):
n = int(input())
ls = [0 for _ in range(n + 1)]
ls[0] = 2
ls[1] = 1
for i in range(2, n + 1):
    ls[i] = ls[i - 1] + ls[i - 2]
print(ls[n])

Solution (Python):
N = int(input())

b, c = 1, 2+1
if N == 1:
    print(b)
if N == 2:
    print(c)
for _ in range(3, N+1):
    b, c = c, c+b
if N not in {1,2}: print(c)

Solution (Python):

n = int(input())
l = [2,1]

for i in range(2,87):
    l.append(l[i-1] + l[i-2])
print(l[n])

Solution (Python):
n = int(input())

lucas = [2, 1]

for i in range(2, n + 1):
    lucas.append(lucas[i - 1] + lucas[i - 2])

print(lucas[n])

Solution (Python):



def main():
    a =2
    b = 1
    k =[2,1]
    n = int(input())

    for _ in range(n):
        k.append(a+b)
        a,b = b,a+b
    print(k[n])


    




if __name__ == "__main__":
    main()

Solution (Python):
N=int(input())
l=[2,1]
for _ in range(N-1):
    l.extend([l[-1]+l[-2]])
print(l[-1])

Solution (Python):
L = [2,1]
for i in range(2,100):
    L.append(L[i-1]+L[i-2])
N = int(input())
print(L[N])

Solution (Python):
from functools import lru_cache

N = int(input().strip())

@lru_cache(maxsize=1000)
def lucas(n):
  if n == 0:
    return 2
  elif n == 1:
    return 1
  else:
    return lucas(n-2) + lucas(n-1)

print(lucas(N))

Solution (Python):
n=int(input())
l=[0]*(n+1)

l[0]=2
l[1]=1

for i in range(n-1):
    l[i+2]=l[i+1]+l[i]
print(l[-1])

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')

n=int(input())

a=2
b=1

for i in range(n):
	a,b=b,a+b
	
print(a)

Solution (Python):
n=int(input())

l =[0 for i in range(87)]
l[0]=2
l[1]=1
for i in range(2,87):
    l[i]=l[i-1]+l[i-2]

print(l[n])

Solution (Python):
ans = [2, 1, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199, 322, 521, 843, 1364, 2207, 3571, 5778, 9349,\
       15127, 24476, 39603, 64079, 103682, 167761, 271443, 439204, 710647, 1149851, 1860498, 3010349, \
       4870847, 7881196, 12752043, 20633239, 33385282, 54018521, 87403803, 141422324, 228826127, \
       370248451, 599074578, 969323029, 1568397607, 2537720636, 4106118243, 6643838879, 10749957122, \
       17393796001, 28143753123, 45537549124, 73681302247, 119218851371, 192900153618, 312119004989, \
       505019158607, 817138163596, 1322157322203, 2139295485799, 3461452808002, 5600748293801, \
       9062201101803, 14662949395604, 23725150497407, 38388099893011, 62113250390418, 100501350283429, \
       162614600673847, 263115950957276, 425730551631123, 688846502588399, 1114577054219522, \
       1803423556807921, 2918000611027443, 4721424167835364, 7639424778862807, 12360848946698171, \
       20000273725560978, 32361122672259149, 52361396397820127, 84722519070079276, 137083915467899403, \
       221806434537978679, 358890350005878082, 580696784543856761, 939587134549734843, 1520283919093591604]

N = int(input())
print(ans[N])

Solution (Python):
n=int(input())
a=2
b=1
if n==0:
    print(a)
elif n==1:
    print(b)
else:
    for i in range(n-1):
        c=a+b
        a=b
        b=c
    print(c)

Solution (Python):
n = int(input())
L = [2, 1]
for i in range(2, n+1):
  L.append(L[i-1]+L[i-2])
print(L[-1])

Solution (Python):
N = int(input())
L = [0] * (N + 1)
L[0] = 2
L[1] = 1
for i in range(2, N+1):
    L[i] = L[i-1] + L[i-2]
print(L[N])

Solution (Python):
N = int(input())
L = [2,1]
for i in range(2,N+1):
  L.append(L[i-1]+L[i-2])
print(L[N])

Solution (Python):
n = int(input())
a = 2
b = 1
c = 1
if n == 1:
    c = 1
else:
    for i in range(1, n):
        c = b + a
        a = b
        b = c
print(c)

Solution (Python):
n = int(input())
first = 2
second = 1
total = 0
if n == 0:
    print(first)
elif n == 1:
    print(second)
else:
    for i in range(n - 1):
        total = first + second
        first = second
        second = total
    print(total)

Solution (Python):
from functools import*;L=lru_cache()(lambda x:L(x-1)+L(x-2)if x>1else 2-x);print(L(int(input())))

Solution (Python):
N=int(input())
res=[0]*(N+1)
res[0]=2
res[1]=1
for i in range(2, N+1):
  res[i]=res[i-2]+res[i-1]

print(res[N])

Solution (Python):
n = int(input())
L1, L2 = 2, 1
L3 = 3

for i in range(n):
  L1, L2, L3 = L2, L3, (L2 + L3)
print(L1)

Solution (Python):
n = int(input())
a = [0 for i in range(n+2)]
a[0], a[1] = 2, 1
for i in range(2, n+2):
    a[i] = a[i - 2] + a[i - 1]
print(a[n])

Solution (Python):
def main():
  N=int(input())
  l=[2,1]
  if N<2:
    print(1)
    exit()
  else:
    for i in range(N-2):
      l[0],l[1]=l[1],l[0]+l[1]
    print(l[0]+l[1])
      

if __name__ == "__main__":
  main()

Solution (Python):
N = int(input())
dp = [0]*(N+10)

for i in range(N+1):
    if i == 0:
        dp[i] = 2
        continue
    if i == 1:
        dp[i] = 1
        continue
    dp[i] = dp[i-1]+dp[i-2]

print(dp[N])

Solution (Python):
n=int(input())
l=[2,1]
if n==0:
    print(2)
elif n==1:
    print(1)
else:
    for i in range(n-1):
        l.append(l[i]+l[i+1])
    print(l[-1])

Solution (Python):
n=int(input())
ans=list()
ans.extend([2,1])

for i in range(2,n):
    ans.append(ans[i-2]+ans[i-1])
        
if n==1:
    print(1)
else:
    print(ans[n-2]+ans[n-1])

Solution (Python):
N = int(input())
L = [0 for i in range(N+1)]
L[0]=2
L[1]=1
for i in range(2, N+1):
  L[i] = L[i-1]+L[i-2]
print(L[N])

Solution (Python):
n = int(input())
l0,l1=2,1
for i in range(n-1):
    l0,l1 = l1,(l0+l1)
print(l1)

Solution (Python):
N = int(input())
L = []*N
L.append(2)
L.append(1)
for i in range(2,N+1):
    n = L[i-1]+L[i-2]
    L.append(n)
print(L[N])

Solution (Python):
n = int(input())
l = [0]*(n+1)
l[0] = 2
l[1] = 1
for i in range(2, n+1):
  l[i] = l[i-1] + l[i-2]
print(l[n])

Solution (Python):
n=int(input())
ans=[2,1]+[0]*(n-1)

for i in range(2,n+1):
    ans[i]=ans[i-1]+ans[i-2]
print(ans[-1])

Solution (Python):

import sys


def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

N = II()
if N == 1:
    print(1)
else:
    a = 2
    b = 1
    for i in range(2, N+1):
        c = a + b
        a = b
        b = c
    print(c)

Solution (Python):
N = int(input())

def fib(x): 
    a, b = 2, 1
    for _ in range(x):
        a, b = b, a+b
    return(a)

ans = fib(N)

print(ans)

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

n = int(input())

memo = {}


def getLuca(nu):
    if (nu == 0):
        return 2
    if (nu == 1):
        return 1
    if (memo.get(nu) != None):
        return memo[nu]
    memo[nu] = getLuca(nu-1)+getLuca(nu-2)
    return memo[nu]


print(getLuca(n))

Solution (Python):
a,b = 2,1
for i in range(int(input())):
    a,b = b,(a+b)
print(a)

Solution (Python):
n = int(input())

l = [2, 1]

for i in range(2, n + 1):
    l.append(l[-1] + l[-2])

print(l[-1])

Solution (Python):
num = list(range(100))
num[0] = 2
num[1] = 1
n = int(input())

for i in range(2,n+1):
    num[i] = num[i-2] + num[i-1]

print(num[n])

Solution (Python):
num = list(range(87))
num[0] = 2
num[1] = 1

for i in range(2,87):
    num[i] = num[i-2] + num[i-1]

print(num[int(input())])

Solution (Python):
def resolve():
    n = int(input())
    luca = [2, 1] + [0] * (n - 1)
    for i in range(2, n + 1):
        luca[i] = luca[i - 1] + luca[i - 2]
    print(luca[n])


if __name__ == "__main__":
    resolve()

Solution (Python):
def lucas(n):
    a,b, index = 2,1,0
    while index < n:
        a,b,index = b,a+b,index+1
    return a
print(lucas(int(input())))

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    l = [0] * 87
    l[0] = 2
    l[1] = 1
    for i in range(2, 87):
        l[i] = l[i-1] + l[i-2]
    print(l[n])


if __name__ == '__main__':
    slove()

Solution (Python):
import sys
import  math
from statistics import *
from collections import *
from operator import itemgetter
"""
from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
"""
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n = ni()
li = [2, 1]
for i in range(90):
    li.append(li[-1] + li[-2])
print(li[n])

Solution (Python):
a,b=2,1;exec("a,b=b,a+b;"*int(input()));print(a)

Solution (Python):
a,b=2,1
for _ in[0]*int(input()):a,b=b,a+b
print(a)

Solution (Python):
a,b=2,1
for _ in[0]*~-int(input()):a,b=b,a+b
print(b)

Solution (Python):
N = int(input())

L_2 = 2
L_1 = 1

if N == 1:
    print(1)
    exit(0)

i = 1
while i < N:
    L = L_1 + L_2
    L_2 = L_1
    L_1 = L
    i += 1
print(L)

Solution (Python):
n = int(input())
ls = [0] * 87
ls[0] = 2
ls[1] = 1
for i in range(2,n+1):
  ls[i] = ls[i-1] + ls[i-2]
print(ls[n])

Solution (Python):
n = int(input())
def lucas(n):
    a,b = 2,1
    if n == 0:
        return a
    elif n == 1:
        return b
    for _ in range(n-1):
        a,b = b,a+b
    return b
print(lucas(n))

Solution (Python):
n = int(input())
table = [-1] * (n + 1)
table[0] = 2
table[1] = 1
def lucas(i):
    if table[i] != -1:
        return table[i]
    ret = lucas(i-1) + lucas(i-2)
    table[i] = ret
    return ret
print(lucas(n))

Solution (Python):
N = int(input())

l = [-1] * (N+1)

l[0] = 2
l[1] = 1

for i in range(2, N+1):
  l[i] = l[i-1] + l[i-2]
  
print(l[N])

Solution (Python):
N = int(input())
L0 = 2
L1 = 1
for i in range(N-1):
    L = L0 + L1
    L0,L1 = L1,L
if N == 1:
    print(1)
else:
    print(L)

Solution (Python):
n = int(input())
L = [2,1,]

for i in range(2,n+1):
    m = L[i-2]+L[i-1]
    L.append(m)

print(L[n])

Solution (Python):
N = int(input())
L = [2,1]
for i in range(2,N+1):
    tmp = L[i-1] + L[i-2]
    L.append(tmp)

print(L[N])

Solution (Python):
N = int(input())

pre, cur = 2, 1
while N - 2 >= 0 :
    pre, cur = cur, pre+cur
    N -= 1
print(cur)

Solution (Python):
N = int(input())
L = [0 for i in range(N+1)]
L[0]=2
L[1]=1
for i in range(2, N+1):
  L[i] = L[i-1]+L[i-2]
print(L[N])

Solution (Python):
n = int(input())
ls = [2, 1]
for i in range(n - 1):
    ls.append(ls[-1] + ls[-2])
print(ls[-1])

Solution (Python):
n=int(input())
L=[2,1]
if n==1:
    print(1)
else:
    for i in range(2,n+1):
        l=L[i-1]+L[i-2]
        L.append(l)
    print(l)

Solution (Python):
N = int(input())

L = [2, 1]

if N == 1:
	print(1)
else:
	for i in range(2, N + 1):
		L.append(L[i-1] + L[i-2])
	print(L[N])

Solution (Python):
a,b = 2,1
for _ in range(int(input())):
    a,b = b,a+b
print(a)

Solution (Python):
n=int(input())

l0,l1=2,1
if n==1:
  print(l1)
else:
  for i in range(2,n+2):
    li=l1+l0
    l0,l1=l1,li
    if i==n:
      print(li)
      exit()

Solution (Python):
N = int(input())

a =[0]*87
a[0] = 2
a[1] = 1

for i in range(2,87):
    a[i]=a[i-2]+a[i-1]

print(a[N] )

Solution (Python):
N=int(input())

L=[]
L.append(2)
L.append(1)

for _ in range(1,N):
    L[0],L[1] = L[1],L[1]+L[0]
print(L[1])

Solution (Python):
N = int(input())
L = [2, 1]
for i in range(2, N+1):
    L.append(L[i-1]+L[i-2])
print(L[N])

Solution (Python):
n = int(input())
Li0 = 2
Li1 = 1
Lnow = 0
if n == 1:
    print(Li1)
else:
    for i in range(2,n+1):
        Lnow = Li1 + Li0
        Li0 = Li1
        Li1 = Lnow
    print(Lnow)

Solution (Python):
def main():
    N = int(input())

    l = [0] * (N+1)
    l[0] = 2
    l[1] = 1

    for i in range(2, N+1):
        l[i] = l[i-1] + l[i-2]
    
    print(l[-1])


if __name__ == "__main__":
    main()

Solution (Python):
def main():
    n = int(input())
    x1 = 1
    x2 = 2
    if n == 1:
        print(1)
    else:
        ans = 0
        for _ in range(n-1):
            ans = x1+x2
            t = x2
            x2 = x1
            x1 = x1 + t
        print(ans)
    
if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())

lucas=[2,1]
if n>=2:
    for i in range(n-1):
        lucas.append(lucas[-1]+lucas[-2])


print(lucas[-1])

Solution (Python):
n = int(input())
L0 = 2
L1 = 1
for i in range(n):
    L0,L1 = L1,L0+L1
print(L0)

Solution (Python):
N = int(input())
a, b = 2, 1
for _ in range(N):
    a, b = b, (a + b)
print(a)

Solution (Python):
N = int(input())
Ls = [2, 1]
for i in range(1, N):
  L = Ls[i]+Ls[i-1]
  Ls.append(L)

r = Ls[N]
print(r)

Solution (Python):
n=int(input())
l=[]
l.append(2);l.append(1)
for i in range(2,n+1):
  l.append(l[i-2]+l[i-1])
print(l[n])

Solution (Python):
n = int(input())
luc = [2, 1]

if n < 2:
    print(luc[n])
else:
    for _ in range(n - 1):
        tmp = sum(luc)
        luc = luc[1:] + [tmp]
    print(luc[1])

Solution (Python):
N = int(input())
a=2
b=1
for i in range(N):
  a,b=b,a+b
print(a)

Solution (Python):


N = int(input())
x, y = 2, 1

for i in range(N):
    x, y = y, x + y

print(x)

Solution (Python):

N = int(input())


prev = [2, 1]
if N == 1:
    res = 1
else:
    for i in range(2, N+1):
        prev[0], prev[1] = prev[1], sum(prev)
    res = prev[1]


print(res)

Solution (Python):
dp=[0 for _ in range(88)]

dp[0]=2
dp[1]=1

for i in range(88):
	if i>1:
		dp[i]=dp[i-1]+dp[i-2]

print(dp[int(input())])

Solution (Python):
n = int(input())
lucas = [2, 1]

for _ in range(n - 1):
  lucas.append(lucas[-1] + lucas[-2])
  
print(lucas[-1])

Solution (Python):
def main():
    N = int(input())
    memo = dict()
    def f(i):
        if i not in memo:
            if i == 0:
                memo[i] = 2
            elif i == 1:
                memo[i] = 1
            else:
                memo[i] = f(i-1) + f(i-2)
        return memo[i]
    return f(N)

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

Solution (Python):
n = int(input())
a, b = 1, 2
for i in range(n - 1):
    a, b = a + b, a
print(a)

Solution (Python):
L0, L1 = 2, 1
for i in range(int(input())):
    L0, L1= L1, L0+L1
print(L0)

Solution (Python):
n = int(input())

a, b = 2, 1

for _ in range(n):
  a, b = b, a+b

print(a)

Solution (Python):
N = int(input())
L = [0] * (N + 1)
L[0] = 2
L[1] = 1

if N ==1:
    print(L[1])
    exit()
for i in range(2, N + 1):
    L[i] = L[i - 2] + L[i - 1]

print(L[i])

Solution (Python):
n = int(input())
l = {}
l[0] = 2
l[1] = 1

for i in range(2,n+1):
  l[i] = l[i-1] + l[i-2]
  
print(l[n])

Solution (Python):
n=int(input())
l=[2,1]
for _ in range(2,n+1):
  l.append(l[-2]+l[-1])
print(l[-1])

Solution (Python):
n = int(input())
l = [2] + [1] + [0] * (n-1)
for i in range(2,n+1):
    l[i] = l[i-1] + l[i-2]
print(l[n])

Solution (Python):
a, b = 2,1
n = int(input())
for i in range(n-1):
  a, b = b, a+b
print(b)

Solution (Python):
a=2
b=1
n=int(input())

for i in range(n-1):
    t=b
    b=a+b
    a=t
print(b)

Solution (Python):
memo=[-1]*87
def lucas(n):

    if n==0:
        return 2
    if n==1:
        return 1
    if memo[n]!=-1:
        return memo[n]
    else:
        memo[n]=lucas(n-1)+lucas(n-2) 
        return memo[n]
print(lucas(int(input())))

Solution (Python):
N = int(input())
L0 = 2
L1 = 1
if N == 1:
  	ans = 1

else:
	for i in range(N-1):
		ans = L0 + L1
		L0 = L1
		L1 = ans
print(ans)

Solution (Python):
a,b=2,1
for i in range(int(input())):
  a,b=b,(a+b)
print(a)

Solution (Python):
def fib(n):
    a, b = 2, 1
    if n == 0:
        return a
    elif n == 1:
        return b
    else:
        for i in range(n - 1):
            a, b = b, a + b
        return b

N = int(input())
print(fib(N))

Solution (Python):
n=int(input())
l0=2
l1=1
for i in range(n-1):
    l=l0
    l0=l1
    l1=l+l1
print(l1)

Solution (Python):
n=int(input())
a=2
b=1
for i in range(n-1):
  a,b=b,a+b
print(b)

Solution (Python):
a,b = 2,1

for i in range(int(input())):a,b = b,a+b
print(a)

Solution (Python):
N = int(input())
L = [0] * (N + 1)
L[0] = 2
L[1] = 1
for i in range(2, N + 1):
    L[i] = L[i-1] + L[i-2]
print(L[N])

Solution (Python):
n=int(input())
a,b=2,1
for i in range(n):
    a,b=b,a+b
print(a)

Solution (Python):
n = int(input())


def ryuka(n):
    a, b = 2, 1
    for _ in range(n):
        a, b = b, a+b
    return a


print(ryuka(n))