Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

// I/O
type Scanner struct {
	sc *bufio.Scanner
}

func NewScanner() *Scanner {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 1024), int(1e+9))
	return &Scanner{sc}
}

func (s *Scanner) nextStr() string {
	s.sc.Scan()
	return s.sc.Text()
}

func (s *Scanner) nextInt() int {
	i, e := strconv.Atoi(s.nextStr())
	if e != nil {
		panic(e)
	}
	return i
}

func (s *Scanner) nextFloat() float64 {
	f, e := strconv.ParseFloat(s.nextStr(), 64)
	if e != nil {
		panic(e)
	}
	return f
}

func (s *Scanner) nextRuneSlice() []rune {
	return []rune(s.nextStr())
}

func (s *Scanner) nextIntSlice(n int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = s.nextInt()
	}
	return res
}

func (s *Scanner) nextFloatSlice(n int) []float64 {
	res := make([]float64, n)
	for i := 0; i < n; i++ {
		res[i] = s.nextFloat()
	}
	return res
}

// Arithmetic
func max(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m < i {
			m = i
		}
	}
	return m
}

func min(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m > i {
			m = i
		}
	}
	return m
}

func abs(x int) int {
	if x > 0 {
		return x
	}
	return -x
}

func pow(x, y int) int {
	res := 1
	for i := 0; i < y; i++ {
		res *= x
	}
	return res
}

func ceil(a, b int) int {
	if a%b == 0 {
		return a / b
	} else {
		return a/b + 1
	}
}

// Sort
type RuneSlice []rune

func (a RuneSlice) Len() int           { return len(a) }
func (a RuneSlice) Less(i, j int) bool { return a[i] < a[j] }
func (a RuneSlice) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }

// Main
func main() {
	sc := NewScanner()
	wtr := bufio.NewWriter(os.Stdout)
	N := sc.nextInt()
	dp := make([]int, N+1)
	dp[0] = 1
	dp[1] = 1
	for i := 2; i <= N; i++ {
		dp[i] = dp[i-1] + dp[i-2]
	}

	fmt.Fprintln(wtr, dp[N])
	wtr.Flush()
}

Python: import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

from collections import deque
sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

def fib_memo(n):
    memo = [0] * (n+1)
    def fib(n):
        if n <= 1:
            return 1
        if memo[n] != 0:
            return memo[n]
        memo[n] = fib(n-1) + fib(n-2)
        return memo[n]
    return fib(n)
print(fib_memo(ni()))

Python: def fibonacchi(n: int) -> int:
    global computed_result
    if computed_result.get(n):
        return computed_result[n]
    else:
        computed_result[n] = fibonacchi(n - 2) + fibonacchi(n - 1)
        return computed_result[n]


if __name__ == "__main__":
    n = int(input())
    computed_result = {0 : 1, 1: 1}
    print(f"{fibonacchi(n)}")

Python: n= int(input())
if n <= 1:
  print(1)
  exit()
fib_ = [0]*(n+1)
fib_[0] = 1
fib_[1] = 1

def fib(n):
  if fib_[n] >= 1:
    return fib_[n]
  else:
    fib_[n] = fib(n-1)+fib(n-2)
    return fib(n-1)+fib(n-2)
print(fib(n))

Python: def fib(n):
    if n == 0 or n == 1:
        ans[n] = 1
        return 1
    # ?????¢???????¨?????????????????´???§????????°?????????????????????
    if ans[n] != -1:
        return ans[n]

    ans[n] = fib(n-1) + fib(n-2)
    return ans[n]


N = int(input())
ans = [-1 for i in range(N+1)]
a = fib(N)
print(a)

Python: _fib = [0] * 45

def fib(n):
    if n < 2:
        return 1
    if _fib[n] > 0:
        return _fib[n]
    _fib[n] = fib(n-1) + fib(n-2)
    return _fib[n]

n = int(input())
print(fib(n))

Python: def makeFibonacci(n):
    if n <= 2:
        return str(1)
    F = [None]*n
    F[0] = 1
    F[1] = 1
    for i in range(2, n):
        F[i] = F[i-1] + F[i - 2]
    return str(F[n-1])

n = int(input())
print(makeFibonacci(n))

Python: # coding: utf-8

def fib(a, b, c):
    if c==0:
        return a
    return fib(a+b, a, c-1)
    
n = int(input().rstrip())
print(fib(0, 1, n+1))

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

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


def rec(x):
    if dp[x]>0:
        return dp[x]

    res=rec(x-1)+rec(x-2)
    dp[x]=res
    return dp[x]

print(rec(n))

Python: a=1
b=1
list=[]
n=int(input())
list.append(a)
list.append(b)
for i in range(n):
  list.append(a+b)
  d=b
  b+=a
  a=d
print(list[n])

Python: if __name__ == "__main__":
    n = input()
    F = []
    F.append(1)
    F.append(1)
    for i in range(2,n+1):
        F.append(F[i-1] + F[i-2])
        print(F[i])

    print(F[n])

Python: n = int(input())

num = [1,1]

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

Python: def resolve():
    '''
    code here
    '''
    import sys

    sys.setrecursionlimit(100000000)
    N = int(input())

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

    def fina(n):
        if n <= 1:
            memo[n] = 1
            return 1

        if memo[n] != 0:
            return memo[n]

        memo[n-1] = fina(n-1)
        memo[n-2] = fina(n-2)        
        memo[n] = memo[n-1] + memo[n-2]

        return memo[n]
    
    print(fina(N))



if __name__ == "__main__":
    resolve()

Python: n = int(input())
a = int(0)
b = int(1)

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

print(A)

Python: n = int(input())
dp = [0]*(n+1)
def fibo(n):
  if n <2:
    return 1
  if dp[n]  > 0:
    return dp[n]
  dp[n] = fibo(n-1) + fibo(n -2)
  return dp[n]
print(fibo(n))

Python: import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")

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

main()

Python: n = int(input())
def fib(i):
    if i<=1: return 1
    else: 
     a=0
     b=1
     for i in range(n+1):
      c=b+a
      b=a
      a=c
     return c
print(fib(n))

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

print(dp[n])

Python: # coding: utf-8
# 40

n = int(input())
a = int(0)
b = int(1)

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

print(A)

Python: n = int(input())
f = [0]*45
f[0] = 1
f[1] = 1

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

Python: def fib(n):
    if n ==0 or n == 1:
        return 1
    l = [0] * (n+1)
    l[0] = 1
    l[1] = 1

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

print(fib(int(input())))

Python: # -*- coding: utf-8 -*-
"""
Created on Fri May  4 20:13:10 2018
ALDS1_10_A
@author: maezawa
"""

fib_arr = [None for _ in range(45)]
fib_arr[1] = 1
fib_arr[2] = 1

def fib(n):
    if fib_arr[n] != None:
        return fib_arr[n]
    fib_arr[n] = fib(n-1)+fib(n-2)
    return fib_arr[n]
    
n = int(input())
print(fib(n))

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

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

Python: 
fibo_list=[0 for i in range(48)]

def fibo(n):
    f=fibo_list[n]
    if f:
        return f
    else:
        if n==0 or n==1:
            return 1
        else:
            f=fibo(n-1)+(fibo(n-2))
    fibo_list[n]=f
    return f


n=input()
print(fibo(n))

Python: def fina(n, fina_list):

    if n <= 1:
        fina_list[n] = 1
        return fina_list[n]
    elif fina_list[n]:
        return fina_list[n]
    else:
        fina_list[n] = fina(n-1, fina_list) + fina(n-2, fina_list)
        return fina_list[n]


n = int(input())
fina_list = [None]*(n + 1)
print(fina(n, fina_list))