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



Sample input:
5


Sample output:
11

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
L = np.zeros(90)
L[0], L[1] = 2, 1
for i in range(2, len(L)):
    L[i] = int(L[i - 1]) + int(L[i - 2])
print(int(L[N]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a0 = 2
a1 = 1

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a0 = 2
a1 = 1

if n == 1:
    print(2)
elif n == 2:
    print(1)
else:
    for i in range(n-1):
        a0,a1 = a1,(a0+a1)
    print(a1)

Submission status: Wrong Answer

Solution code:
n = int(input())
a0 = 2
a1 = 1

if n == 1:
    print(2)
elif n == 2:
    print(1)
else:
    for i in range(n-1):
        a0,a1 = a1,(a0+a1)
        print(a0,a1)
    print(a1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#n = int(input())
#n,k = map(int,input().split())
#x = list(map(int,input().split()))


n = int(input())
li = [0 for i in range(100)]
li[0]=2
li[1]=1

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

print(li[-1])
#print(li)

Submission status: Wrong Answer

Solution code:
n = int(input())
x = 2
ans = 1
for i in range(n-1):
  ans += x
  x = ans
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
Num = [2,1]

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

ans = Num[n-1]
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
l0 = 2
l1 = 1
lis = []
lis.append(l0)
lis.append(l1)

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

print(max(lis))

Submission status: Wrong Answer

Solution code:
N = int(input())

a = 2
b = 1

if N == 1:
    print(2)
elif N == 2:
    print(1)
else:
    for _ in range(N-1):
        c = a + b
        a, b = b, c

    print(c)

Submission status: Wrong Answer

Solution code:
N = int(input())

l = [1, 2]

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

Submission status: Wrong Answer

Solution code:
n=int(input())
pre=2
post=1
num=0
for i in range(1,n):
  num=pre+post
  pre=post
  post=num
print(num)

Submission status: Wrong Answer

Solution code:
n=int(input())
pre=2
post=1
num=0
for i in range(n-1):
  num=pre+post
  pre=post
  post=num
print(num)

Submission status: Wrong Answer

Solution code:
l_0 = 2
l_1 = 1
A = int(input())
if A == 1:
  print(l_0)
elif A == 2:
  print(l_1)
else:
  for i in range(1,A-1):
    if i%2 == 0:
      p = l_1
      l_1 = l_0 + l_1
      l_0 = p
    else:
      p = l_1
      l_1 = l_0 + l_1
      l_0 = p
  print(max(l_0,l_1))

Submission status: Wrong Answer

Solution code:
l_0 = 2
l_1 = 1
A = int(input())
if A == 1:
  print(l_0)
elif A == 2:
  print(l_1)
else:
  for i in range(A-1):
    if i%2 == 0:
      p = l_1
      l_1 = l_0 + l_1
      l_0 = p
    else:
      p = l_1
      l_1 = l_0 + l_1
      l_0 = p
  print(max(l_0,l_1))

Submission status: Wrong Answer

Solution code:
l_0 = 2
l_1 = 1
A = int(input())
if A == 0:
  print(l_0)
elif A == 1:
  print(l_1)
else:
  for i in range(A-1):
    if i%2 == 0:
      p = l_1
      l_1 = l_0 + l_1
      l_0 = p
    else:
      p = l_1
      l_1 = l_0 + l_1
      l_0 = p
print(max(l_0,l_1))

Submission status: Wrong Answer

Solution code:
l_0 = 2
l_1 = 1
A = int(input())
if A == 0:
  print(l_0)
elif A == 1:
  print(l_1)
else:
  for i in range(A):
    if i%2 == 0:
      p = l_0
      l_0 = l_0 + l_1
      l_1 = p
    else:
      p = l_1
      l_1 = l_0 + l_1
      l_0 = p
print(max(l_0,l_1))

Submission status: Wrong Answer

Solution code:
N = int(input())
mi = 2
ni = 1
ans = 1
if ans==N:
    print(mi+ni)
    exit()
for i in range(2,N+1):
    ans += 1
    num = ni + mi
    mi = ni
    ni = num
    if ans == N:
        print(num)
        exit()

Submission status: Wrong Answer

Solution code:
N = int(input())
mi = 2
ni = 1
ans = 1
for i in range(2,N+1):
    ans += 1
    num = ni + mi
    mi = ni
    ni = num
    if ans == N:
        print(num)
        exit()

Submission status: Wrong Answer

Solution code:
n = int(input())
l0,l1 = 2,1
if n == 1:
    ans = l0
elif n == 2:
    ans = l1
else:
    for i in range(1,n):
        ans = l0 + l1
        l0 = ans
        l0,l1 = l1,l0
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
L_2 = 2
L_1 = 1
K = 0
for i in range(N-1):
  K = L_1+L_2
  L_2 = L_1
  L_1 = K
print(int(K))

Submission status: Wrong Answer

Solution code:
N = int(input())
L_2 = 2
L_1 = 1
K = 0
for i in range(N-1):
  K = L_1+L_2
  L_2 = L_1
  L_1 = K
print(K)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
l0=2
l1=1
ln=0
for i in range(n-1):
    ln=l0+l1
    l0=l1
    l1=ln

print(ln)

Submission status: Wrong Answer

Solution code:
#  ABC 079: B – Lucas Number
n = int(input())

l = []

l.append(2)
l.append(1)

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

print(l[-1])

Submission status: Wrong Answer

Solution code:
n = int(input())
li_2 = 2
li_1 = 1
luca = 0
for i in range(2, n+1):
    luca = li_1 + li_2
    temp = li_2
    li_2 = li_1
    li_1 = luca
print(luca)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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])
print(memo)
if N == 1:
    print(1)
else:
    print(memo[N - 1] + memo[N - 2])

Submission status: Wrong Answer

Solution code:
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])
print(memo[N-1] + memo[N - 2])

Submission status: Wrong Answer

Solution code:
N=int(input())
if N==1:
  print(2)
elif N==2:
  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])

Submission status: Wrong Answer

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

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

print(luca)
print(luca[N])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
prev=2
now=1
for i in range(N-2):
  prev,now=now,now+prev
print(now)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
l0,l1=2,1

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

print(l0)

Submission status: Wrong Answer

Solution code:
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])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())
i = 2
m = 2
n = 1
ans = 0
while True:
  ans = m + n
  if(i == N):
    break
  k = m
  m = ans
  n = k
  i += 1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
l = [2,1,3,5,8,13,21,34,55,89]
i = 10
while True:
  l.append(l[i-2]+l[i-1])
  if(i==N):
    break
  i += 1
print(l[-1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a,b,c = 2,1,0

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

print(b)

Submission status: Wrong Answer

Solution code:
a=2
b=1
n=int(input())
if n==1:print(a)
else:
    for i in range(n-1):
        t=b
        b=a+b
        a=t
    print(b)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
l1 = 2
l2 = 1
ans = 0
if n == 1:
    print(l2)
    exit()
for i in range(n):
    ans = l1 + l2
    l2 = ans
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
l1 = 2
l2 = 1
ans = 0
if n == 1:
    print(l2)
    exit()
for i in range(1, n):
    ans = l1 + l2
    l2 = ans
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
l1 = 2
l2 = 1
ans = 0
if n == 1:
    print(l2)
    exit()
for i in range(1, n):
    ans, l2 = l1 + l2, ans
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
a,b,c = 2,1,3
for i in range(n-3):
    a = b+c
    b = a+c
    c = a+b
print(a if n>=4 else b if n==2 else c if n==3 else a)

Submission status: Wrong Answer

Solution code:
n = int(input())
tb = [0] * max(3, (n + 1))
tb[1] = 2
tb[2] = 1

if n > 2:
  for i in range(3, n+1):
    tb[i] = tb[i - 1] + tb[i - 2] 

print(tb[n])

Submission status: Wrong Answer

Solution code:
L=[]
L.append(2)
L.append(1)

def luca(N,cnt):
  L.append(L[-2]+L[-1])
  if N==cnt:
    print(L[-1])
  else:
    cnt+=1
    luca(N,cnt)
N = int(input())

if N<=1:
  pass
else:
  N-=2

cnt=0
luca(N,cnt)

Submission status: Wrong Answer

Solution code:

n = int(input())
l0 = 2
l1 = 1
count = 2
for i in range(2, 86+1):
    li = l1 + l0
    if count == n:
        print(li)
        exit()

    l0, l1 = l1, li
    count += 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

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

print(l[-1])

Submission status: Wrong Answer

Solution code:
n = int(input())

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

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

print(l[-1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
l0 = 2
l1 = 1
for i in range(2, n + 1):
    if i % 2 == 0:
        l0 = l0 + l1
    else:
        l1 = l0 + l1
print(max(l0, l1))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = 2
b = 1
c = 3
for _ in range(n - 2):
    (a,b,c) = (b, c, b+c)
print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
i=int(input())
L=[0,1,1]
if i==1:
    A=2
else:
    for j in range(2,i):
        a=L[j-1]+L[j]
        L.append(a)
    A = 2*L[i-1]+L[i]

print(A)

Submission status: Wrong Answer

Solution code:
i=int(input())
L=[0,1,1]

for j in range(2,i):
    a=L[j-1]+L[j]
    L.append(a)
    print(a)
A = 2*L[i-1]+L[i]
print(A)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(L[N])
print(L)

Submission status: Wrong Answer

Solution code:
import math
n= int(input())

l=((1+math.sqrt(5))/2)**n+((1-math.sqrt(5))/2)**n
print(int(l+0.1))

Submission status: Wrong Answer

Solution code:
import math
n= int(input())

l=((1+math.sqrt(5))/2)**n+((1-math.sqrt(5))/2)**n
print(int(l))

Submission status: Wrong Answer

Solution code:
def abc():
    n = int(input())
    if n == 0:
        return 2
    if n == 1:
        return 1
    lucas = [2, 1]
    for i in range(2, n+1):
        lucas.append(lucas[i-1]+lucas[i-2])
    print(lucas[-1])


abc()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
L0 = 2
L1 = 1
for i in range(N):
  M = L0+L1
  L0 = L1
  L1 = M
print(M)

Submission status: Wrong Answer

Solution code:
N = int(input())
L = [ 0 ] * 87

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

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

print (L[N])

Submission status: Wrong Answer

Solution code:
n = int(input())
pre2 = 2
pre1 = 1
for i in range(1, n-1):
  tmp = pre2 + pre1
  pre2 = pre1
  pre1 = tmp
print(pre1+pre2)

Submission status: Wrong Answer

Solution code:
Lucas_list = [2,1] + [0 for i in range(86)]

for i in range(84):
  Lucas_list[i+2] = Lucas_list[i] + Lucas_list[i+1]
  
print(Lucas_list[int(input())])

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())
L0, L1 = 2, 1
while True:
    if n == 1:
        print(L1)
        exit()
    L0 += L1
    n -= 1
    if n == 3:
        print(L0)
        exit()
    L1 += L0
    n -= 1

Submission status: Wrong Answer

Solution code:
l=[]
l.append(2)
l.append(1)

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

# 入力
N=int(input())

# 出力
print(l[N-1])

Submission status: Wrong Answer

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

if n == 1:
    print(1)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a = 2
b = 1
ans = 0
if n == 1:
    print(b)
else:
    for i in range(n-1):
        ans = a + b
        a = b
        b = ans
        #print(a)
        #print(b)
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = 2
b = 1
ans = 0
for i in range(n-1):
    ans = a + b
    a = b
    b = ans
    #print(a)
    #print(b)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
a=2
b=1
c=a+b
if n >= 3 :
 for i in range(n-2):
  a,b,c=b,c,b+c
 print(c)

elif n==2:
  print(1)
else:
  print(2)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=2
b=1
c=a+b

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# -*- cooding utf-8 -*-
n=int(input())
l=[2,1]

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

print(l[-1])

Submission status: Wrong Answer

Solution code:
N = int(input())

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

print(Luca[1])

Submission status: Wrong Answer

Solution code:
n = int(input())

a = 2
b = 1
l = 0
for i in range(n+1):
    if i == 0 or i == 1:
        a = 2
        b = 1
    else:
        l = a + b
        a = b
        b = l

print(l)

Submission status: Wrong Answer

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

print(lucas[N - 1])

Submission status: Wrong Answer

Solution code:
n = int(raw_input())
L0 = 2; L1 = 1
if n == 1:
	print L0
elif n == 2:
	print L1
else:
	for i in range(n - 1):
		L2 = L1 + L0
		L0 = L1
		L1 = L2
	print L2

Submission status: Wrong Answer

Solution code:
import numpy as np
N = input()

L = np.zeros(88)
L[0] = 2
L[1] = 1

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

print(int(L[int(N)]))

Submission status: Wrong Answer

Solution code:
n = int(input())

l1 = 2
l2 = 1
l3 = 3

for i in range(n-1):
    t = l1 + l2
    l1 = l2
    l3 = t
    l2 = l3

print(l3)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

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

print(dp[N])

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

n = int(input())

lucas = [0] * 100
lucas[0] = 2
lucas[1] = 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

def main():
    input = sys.stdin.readline
    N = int(input())
    if N == 0:
        print(2)
    if N == 1:
        print(1)

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

    print(lucas[N])


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
l1 = 2
l2 = 1
for i in range(n-1):
  l2 += l1
  l1 = l2

Submission status: Wrong Answer

Solution code:
N = int(input())

l, m, n = 2, 1, 0
for i in range(2, N+1):
    n = l + m
    l = m
    m = n

print(n)

Submission status: Wrong Answer

Solution code:
N=int(input()) 
tmpb=2 
tmpa=1 
num=0 
for i in range(N-1): 
    num=tmpb+tmpa 
    tmpb=tmpa 
    tmpa=num 
print(num)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []
a.append(2)
a.append(1)

for i in range(n+1):
    if n==1:
        print(a[1])
        break
    elif n==0:
        print(a[0])
        break
    else:
        a.append(a[i]+a[i+1])

print(a[n])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
N = int(input())
L0 = 2
L1 = 1

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

for _ in range(N):
    L = L0 + L1
    L0 = L1
    L1 = L
print(L)

Submission status: Wrong Answer

Solution code:
n = int(input())
print(int(((1-5**(1/2))/2)**(n) + ((1+5**(1/2))/2)**(n)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
a=2
b=1
c=0
for i in range(n):
  c=a+b
  a=b
  b=c
print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())
ar = [2,1]
count = 2
if a == 1:
    print(1)
else:
    while count != a:
        count += 1
        ar.append(sum(ar))
        del ar[0]
print(sum(ar))

Submission status: Wrong Answer

Solution code:
n = int(input())
l0 = 2
l1 = 1
s = 0
for i in range(n - 1):
  s = l0 + l1
  l0 = l1
  l1 = s

if n == 1:
  print(l0)
else:
  print(s)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N == 1:
    print(2)
elif N == 2:
    print(1)
else:
    L1 = 2
    L2 = 1
    L = 0
    for i in range(N-1):
        L = L1 + L2
        L1 = L2
        L2 = L
    print(L)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N == 1:
    print(1)
elif N == 2:
    print(2)
else:
    L1 = 2
    L2 = 1
    L = 0
    for i in range(N-1):
        L = L1 + L2
        L1 = L2
        L2 = L
    print(L)

Submission status: Wrong Answer

Solution code:
def lucas(n):
  if n == 0:
    return 2
  elif n == 1:
    return 1
  else:
    a = lucas(n-1)
    b = lucas(n-2)
    c = a+b
    return(c)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin

n = int(stdin.readline().rstrip())
l_2 = 0
l_1 = 0
l_0 = 0

for i in range(n+1):
    if i == 0:
        l_2 = 2
    elif i == 1:
        l_1 = 1
    else:
        l_0 = l_2 + l_1
        l_2 = l_1
        l_1 = l_0
print(l_0)

Submission status: Wrong Answer

Solution code:
n = int(input())

l_prev = 2
l_next = 1

l_new = 0
for i in range(2, n+1):
    l_new = l_prev + l_next
    l_prev = l_next
    l_next = l_new
print(l_new)

Submission status: Wrong Answer

Solution code:
n = int(input())
l0 = 2
l1 = 1
if n == 0:
    print(l0)
if n == 1:
    print(l1)

l_prev = l0
l_next = l1

l_new = 0
for i in range(2, n+1):
    l_new = l_prev + l_next
    l_prev = l_next
    l_next = l_new
print(l_new)

Submission status: Wrong Answer

Solution code:
N = int(input())
def fib(n):
    if n == 1:
        return n
    if n == 0:
        return 2
    else:
        a = fib(n-1)
        b = fib(n-2)
        c = a+b
        return c
    
fib(N)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N == 1:
    print(2)
elif N == 2:
    print(1)
else:
    a = 2
    b = 1
    for i in range(N-1):
        a,b = b,a+b
    print(b)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

memo = dict()

def luca(n):
  if n == 0:
    return 2
  elif n == 1:
    return 1
  if n in memo:
    return memo[n]
  tmp = luca(n-1) + luca(n-2)
  memo[n] = tmp
  
  return tmp

print(N)

Submission status: Wrong Answer

Solution code:
x = input()
x = int(x)

answer = []
for p in range(2, 10):

    for i in range(1, 33):
        if i**p > x:
            answer.append((i-1)**p)
            break
        elif pow(i, p) == x:
            answer.append(i**p)
            break

print(max(answer))

Submission status: Wrong Answer

Solution code:
x = input()
x = int(x)

answer = []
for p in range(2, 10):

    for i in range(1, 32):
        if i**p > x:
            answer.append((i-1)**p)
            break
        elif pow(i, p) == x:
            answer.append(i**p)
            break

print(max(answer))

Submission status: Wrong Answer

Solution code:
x = input()
x = int(x)

answer = []
for p in range(2, 10):

    for i in range(1, 32):
        if i**p > x:
            answer.append((i-1)**p)
            break
        elif pow(i, p) == x:
            answer.append(i**p)
            break

print(answer)
print(max(answer))

Submission status: Wrong Answer

Solution code:
n = int(input())
ryuka = [2,1,3]

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

Submission status: Wrong Answer

Solution code:
N=int(input())
if N==0: print(1)
elif N==1: print(0)
else:
  Ln_2=0
  Ln_1=2
  Ln=1
  for i in range(N-2):
    Ln_2=Ln_1
    Ln_1=Ln
    Ln=Ln_1+Ln_2
  print(Ln)

Submission status: Wrong Answer

Solution code:
N=int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
a=np.zeros(87)
a[0]=2
a[1]=1
N=int(input())
for i in range(2,N+1):
    a[i]=a[i-1]+a[i-2]
print(int(a[N]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def Lucas(n):
  if n==0: return 2
  if n==1: return 1
  a=2
  b=1
  for i in range(2,n):
    a,b=b,a+b
  return b
N=int(input())
print(Lucas(N))

Submission status: Wrong Answer

Solution code:
n = int(input())

lf = 2
ls = 1
for _ in range(n-1):
    lf, ls = ls, lf + ls
    print(ls)

Submission status: Wrong Answer

Solution code:
N = int(raw_input())
lis = [None]*86
lis[0] = 2
lis[1] = 1
for i in xrange(84):
	lis[i+2] = lis[i+1] + lis[i]
print lis[N-1]

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(res[N])

Submission status: Wrong Answer

Solution code:
N = int(input())
res = [0 for i in range(1000)]
res[1] = 2
res[2] = 1
def lucas(N):
	for i in range(3, N+1):
		res[i] = res[i - 1] + res[i - 2]
	return res[N+1]

print(lucas(N))