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)
    exit()
x = 2
y = 1
ans = 0
for i in range(n-1):
    ans = x + y
    x = y
    y = ans
print(ans)

Solution (Python):
def main():
    n = int(input())
    dp = [0] * 100

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

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

    print(dp[n])


if __name__ == '__main__':
    main()

Solution (Python):

import sys

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

def cal(N: int):
    n = L[N]
    if n != 0:
        return n
    L[N] = cal(N-1)+ cal(N-2)
    return L[N]

def solve(N: int):
    print(cal(N))

    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    solve(N)

if __name__ == '__main__':
    main()

Solution (Python):

import sys
sys.setrecursionlimit(10**6)

n = int(input())

if n == 1:
    print(1)
    exit()

a = 2
b = 1
now = 3
count = 2
for i in range(2, n):
    a = b
    b = now
    now = a+b

print(now)

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

Solution (Python):
def answer(n: int) -> int:
    if n == 1:
        return 1

    two_previous_l = 2
    previous_l = 1
    l = 3
    for _ in range(n - 2):
        two_previous_l = previous_l
        previous_l = l
        l = previous_l + two_previous_l

    return l


def main():
    n = int(input())
    print(answer(n))


if __name__ == '__main__':
    main()

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[-1]+l[-2])
  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())
lst=[2,1]
for i in range(86):
    lst.append(lst[i]+lst[i+1])
print(lst[n])

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

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

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

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):
import sys
N = int(input())
if(N==1):
  print(1)
  sys.exit()
ans = 0
L0 = 2
L1 = 1
for i in range(N-1):
  ans = L0 + L1
  L0 = L1
  L1 = ans
print(ans)

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())
s=[]
s.append(2)
s.append(1)
if n==1:
    print('1')
    exit()
else:
    for i in range(2,87):
        k = s[i-2]+s[i-1]
        s.append(k)
        if i==n:
            print(s[i])
            exit()

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

L = [2, 1]

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

print(L[-1])

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

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

Solution (Python):
lst = list()
lst.append(2)
lst.append(1)

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

print(lst[n])

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

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

Solution (Python):
N = int(input())
L = [0] * 100
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]
if n in [0,1]:
  print(ans[n])
  quit()
for i in range(2,n+1):
  ans.append(ans[i-2]+ans[i-1])
print(ans[-1])

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

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

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

a = [2,1]

for x in range(n-1):
  a.append(a[x] + a[x+1])
  
print(a[-1])

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

Solution (Python):

import sys
input=sys.stdin.readline

def main():
    numbers=[2,1]
    number = int(input())

    for i in range(2,number+1):
        numbers.append(numbers[i-1]+numbers[i-2])
    print(numbers[-1])
    
if __name__=="__main__":
    main()

Solution (Python):
from functools import lru_cache

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

N = int(input())
print(lucas(N))

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

Solution (Python):
n = int(input())
import sys
dp = [0]*(n+3)

dp[0]=2
dp[1]=1
if n<=1:
    print(dp[n])
    sys.exit()

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

print(dp[n])

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

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

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

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

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

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

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

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

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

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

print(l[n])

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

if N == 0:
  print(2)
elif N == 1:
  print(1)
else:
  
  n_2 = 2
  n_1 = 1
  
  for _ in range(N-1):
    n_0 = n_1 + n_2
    n_2 = n_1
    n_1 = n_0
    
  
  print(n_0)

Solution (Python):

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

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

Solution (Python):
import sys
import copy
import math
import itertools
import numpy as np
N = int(input())
L=[2,1]
for i in range(N-1):
    L.append(L[i]+L[i+1])

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[-1])

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

ls[0], ls[1] = 2, 1

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

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

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

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

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

L1 = 1
L0 = 2

for i in range(2,N+1):
  LC = L1 + L0
  L0 = L1
  L1 = LC
  
print(LC)

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

n = int(input())

dp = [0] * (n + 1)
dp[0] = 2
dp[1] = 1

def l(n):
    if dp[n] != 0:
        return dp[n]
    else:
        dp[n] = l(n-1) + l(n-2)
        return dp[n]

print(l(n))

Solution (Python):
n=int(input())
a=2
b=1
i=0
while i<n:
  d=a
  a=b
  b=d+b
  i=i+1
print(a)

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

Solution (Python):

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

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

Solution (Python):
def main():
    n = int(input())
    lucas_list = [2, 1]

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

    print(lucas_list[-1])


if __name__ == "__main__":
    main()

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

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

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

L = [2, 1]

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

print(L[-1])

Solution (Python):

N = int(input())
L = [2, 1]
if N == 1:
    print(1)
    exit()

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

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

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

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

print(a[n])

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

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    N = int(readline())
    res = [2, 1]

    for i in range(100):
        cur = res[i] + res[i + 1]
        res.append(cur)

    print(res[N])


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
l = [2, 1]
for _ in range(n - 1):
    l.append(l[-2] + l[-1])
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[-1])

Solution (Python):
N = int(input())
l1 = 2
l2 = 1

for i in range(N-1):
  l1, l2 = l2, l1 + l2
print(l2)

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

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

ans = num_list[n]
print(ans)

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

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):
n=int(input())
def ryuka(x):
  return l[x-1]+l[x-2]

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

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

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

if n==1:
  print(1)
elif n==2:
  print(3)
else:
  ans=0
  num_1=2
  num_2=1
  for i in range(n-1):
    ans = num_1+num_2
    num_1,num_2 = num_2, ans
  print(ans)

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

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


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


print(luca(N))

Solution (Python):
if __name__ == '__main__':

    n = int(input())

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

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

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

print(l[n])

Solution (Python):
def solve():
    N = int(input())
    L0 = 2
    L1 = 1
    if N == 1:
        print(L1)
        exit()
    Li2 = L0
    Li1 = L1
    Li = Li1 + Li2
    for _ in range(N - 2):
        Li2 = Li1
        Li1 = Li
        Li = Li1 + Li2
    print(Li)

if __name__ == "__main__":
    solve()

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

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = 10**20
def I(): return int(input())
def F(): return float(input())
def S(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()

def resolve():
    N = I()

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

    print(lucas[-1])

if __name__ == '__main__':
    resolve()

Solution (Python):
import numpy as np
n = int(input())
l = np.zeros(87,dtype=int)
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):
n = int(input())
a = 2
b = 1
c = 3
for i in range(n):
    c = b + a
    a = b
    b = c
print(a)

Solution (Python):
def resolve():
    '''
    code here
    '''
    N = int(input())

    memo = [0 for _ in range(N+1)]
    memo[:2] = [2, 1]

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

    print(memo[N])

if __name__ == "__main__":
    resolve()

Solution (Python):
from functools import lru_cache
N = int(input())
@lru_cache(86)
def lucas(x):
  if x == 0:
    return 2
  if  x ==1:
    return 1
  else:
  
    return lucas(x-1) + lucas(x-2)
print(lucas(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())
a,b,c = 2,1,3
for i in range(n):
  a,b,c=b,c,b+c
print(a)

Solution (Python):


import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

seen = {}


def luka(n):
    if n == 0:
        return 2
    if n == 1:
        return 1

    if n in seen.keys():
        return seen[n]
    else:
        seen[n] = luka(n-1) + luka(n-2)
        return seen[n]


N = int(input())
print(luka(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())
luk = [2,1]
for i in range(2,n+1):
    luk.append(luk[i-1]+luk[i-2])
print(luk[-1])

Solution (Python):
N = int(input())
dp = [[]for i in range(87)] 
dp[0] = 2
dp[1] = 1

for i in range(2,87):
    dp[i] = dp[i-1]+dp[i-2]
    if i == N:
        print(dp[i])
        break
else:
    print(dp[N])

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

Solution (Python):
N=int(input())
if N == 1:
    print(1)
    exit()

l0=2
l1=1
for i in range(2,N+1):
    L = l1 + l0
    l0 = l1
    l1 = L

print(L)

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

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):
def main():
    N = int(input())
    L = [2, 1]
    for i in range(1, N):
        L.append(L[i-1]+L[i])
    print(L[-1])
main()

Solution (Python):
N=int(input())
s=2
t=1
for i in range(0,N):
    u=s+t
    s,t,u=t,u,s 
    
print(s)

Solution (Python):
x,y=2,1
n=int(input())
if(n==1):
    print(1)
elif(n==0):
    print(0)
else:
    for i in range(n-1):
        z=x+y
        x=y
        y=z
    print(z)

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

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

L_2 = 2
L_1 = 1
for i in range(N-1):
    L = L_1+L_2
    L_2 = L_1
    L_1 = L
print(L)

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

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

Solution (Python):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): 
    return list(map(int,input().split()))
def m(): 
    return map(int,input().split())
def onem(): 
    return int(input())
def s(x): 
    a = []
    if len(x) == 0:
        return []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): 
    return " ".join(map(str,x))
def max2(x): 
    return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""

n = onem()

data = [0 for i in range(100)]

data[0] = 2
data[1] = 1


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

    print(data[n])

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

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

print(l[n])

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

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

print(l[n])

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[-1])

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

L0, L1 = 2, 1
if n == 1:
    print(L1)
else:
    for _ in range(n - 1):
        L = L0 + L1
        L0, L1 = L1, L
    print(L)

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

Solution (Python):
N = int(input())
l = [2,1]
if N  == 1 :
    print(l[1])
    exit()
for i in range(2,N+1) :
    l.append(l[i-2] + l[i-1])
print(l[-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())
l = [2, 1]
for i in range(n-1):
    l.append(0)

if n >= 2:
    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]*(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):
r = [0]*100
r[0] = 2
r[1] = 1
for i in range(2,90):
    r[i] =r[i-2] + r[i-1]
    
n = int(input())
print(r[n])

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

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

l0 = 2
l1 = 1
l2 = 3
if n == 1:
    print(l1)
else:
    for i in range(n-1):
        l2 = l0 + l1
        l0, l1 = l1, l2
    print(l2)

Solution (Python):
N = int(input())
l2 = 2
l1 = 1
if N == 1:
  ans = 1
else:
  for i in range(N-1):
    l = l2 + l1
    l2 = l1
    l1 = l
  ans = l
print(ans)

Solution (Python):
import copy

n = int(input())
if n == 1:
    print(1)
    exit()

l_2 = 0
l_1 = 2
l_0 = 1
for i in range(2, n+1):
    l_2 = copy.deepcopy(l_1)
    l_1 = copy.deepcopy(l_0)
    l_0 = l_1 + l_2
print(l_0)

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

Solution (Python):
def check(num,memo={}):
  if num==0:
    return 2
  elif num == 1:
    return 1
  elif num in memo:
    return memo[num]
  else:
    memo[num] = check(num-1,memo) + check(num-2,memo)
    return memo[num]

print(check(int(input())))

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

lis = [2, 1]

while len(lis) <= n:
    lis.append(lis[-1] + lis[-2])

print(lis[-1])

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

Solution (Python):
n = int(input())
x = 2
y = 1

for i in range(n):
  if i % 2 == 0:
    x = x + y
  else:
    y = x + y

if n % 2 == 0:
  print(x)
else:
  print(y)

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

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

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

lucas = [2, 1]
for _ in range(n - 1):
    lucas.append(sum(lucas[-2:]))
else:
    print(lucas[-1])

Solution (Python):

def resolve():
    import sys
    input = sys.stdin.readline
    
    
    

    n = int(input().rstrip())

    if n == 1:
        print(1)
        return

    prev = 2
    ln = 1

    for i in range(2, n+1):
        tmp = prev + ln
        prev = ln
        ln = tmp

    print(ln)





if __name__ == "__main__":
    resolve()

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

L = [0 for i in range(N+1)]

if N == 1:
  print(1)

else:
  L[0] = 2
  L[1] = 1

  for n in range(2,N+1):
    L[n] = L[n-1] + L[n-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[-1])

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

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

Solution (Python):
n=int(input())
l=[0]*87
l[0]+=2
l[1]+=1
if n==1:
  print(1)
else:
  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]
if n == 1:
    print(1)
else:
    for i in range(n):
        l.append(l[i+1]+l[i])
    print(l[n])

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

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

for i in range(N+1):
    if i == 0:
        L_0 = 2
    elif i == 1:
        L_1 = 1
    else:
        L_2 = L_0 + L_1
        L_0 = L_1
        L_1 = L_2
        
print(L_2)

Solution (Python):
N=int(input())
k={}
def y(p):
  if p in k.keys():
    return k[p]
  if p == 0:
    return 2
  elif p == 1:
    return 1
  else:
    k[p] = y(p-2)+y(p-1)
    return k[p]
print(y(N))

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

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

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

Solution (Python):
memo = [int(0) for i in range(87)]
def l(n):
    global memo
    if memo[n]>0:
        return memo[n]
    if n == 0:
        memo[0]=2
        return 2
    elif n == 1:
        memo[1]=1
        return 1
    else:
        memo[n] = l(n-1)+l(n-2)
        return memo[n]
n = int(input())
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())

def luc(x):
    x1 = 2
    x2 = 1
    if x == 1:
        return x1
    elif x == 2:
        return x2
    else:
        for i in range(x-2):
            x1,x2 = x2, x1 + x2
        return x2

print(luc(n+1))

Solution (Python):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

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

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):
L = [2, 1]
N = int(input())
for i in range(2, N+1):
    L.append(L[-1]+L[-2])
print(L[-1])

Solution (Python):
n = int(input())
l = [0]*100
l[0] = 2
l[1] = 1
for i in range(2,100):
    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-1] + l[i-2]

print(l[N])

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

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

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

print(lucas[N])

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

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

L = [2, 1]

for c in range(85):
    Lc = L[-1] + L[-2]
    L.append(Lc)

print(L[N])

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

Solution (Python):










n = int(input())

if (n == 1):
    print(1)
else:
    l1 = 2
    l2 = 1
    ans = 0
    for i in range(n-1):
        ans = l2 + l1
        l1 = l2
        l2 = ans
    print(ans)

Solution (Python):










n = int(input())

if (n == 1):
    print(1)
else:
    l1 = 1
    l2 = 3
    ans = 3
    for i in range(n-2):
        ans = l2 + l1
        l1 = l2
        l2 = ans
    print(ans)

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

Solution (Python):
N = int(input())
 
L = [2, 1]
 
if N == 1:
  print(1)
else:
  i = 1
  while i < N:
    L.append(L[i] + L[i-1])
    i += 1
  print(L[-1])

Solution (Python):
import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())


n = inint()

ryuka = [2,1]

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

print(ryuka[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):
N=int(input())
L=[2,1]
if N==1:
  print(L[1])
  exit()
for i in range(2,N+1):
  L.append(L[-2]+L[-1])
print(L[-1])

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

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

a,b = 2,1

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

print(a)

Solution (Python):
import collections
n,q = int(raw_input()) + 1, collections.deque()
while(n):
	q.append(sum(list(q)) if len(q) == 2 else (2  - len(q)))
	if len(q) == 3: 
		q.popleft()

	n -=1
print q[-1]

Solution (Python):
ryuka = [0]*87

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

N = int(input())

print(ryuka[N])

Solution (Python):
N=int(input())
l=[2,1]
for i in range(2,N+1):
  k=l[i-2]+l[i-1]
  l.append(k)
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[i]+l[i+1])
    
print(l[n])

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

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

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

Solution (Python):
a=2
b=1
N=int(input())
for i in range(N):
  a=a+b
  a,b=b,a
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())
l = 2
l2 = 1

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

for i in range(N - 1):
    if i % 2 == 0:
        l = l + l2
    else:
        l2 = l + l2
    
if i % 2 == 1:
    print(l2)
else:
    print(l)

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

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

N = int(input())

lucas = [2, 1]

if N == 1:
    print(1)
    quit()

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

ans = lucas[N]
print(ans)

Solution (Python):

















import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N = int(readline())
    vec = [0] * (N + 1)
    vec[0] = 2
    vec[1] = 1

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

    print(vec[N])
    return


if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
if n==0:
    print(2)
    exit()
elif n==1:
    print(1)
    exit()
else:
    nu1=2
    nu2=1
    for i in range(n-1):
        nu3=nu1+nu2
        nu1=nu2
        nu2=nu3
print(nu3)

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

now = 1
last = 2

for i in range(N):
	now, last = last + now, now
	
print(last)

Solution (Python):
N=int(input())
a=2
b=1
for x in range(N-1):
  c=b
  b=a+b
  a=c
print(b)

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

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

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

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

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

print(ans[N])

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

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

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