Go: package main

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

var (
	nstr   func() string
	stdout *bufio.Writer
)

func init() {
	nstr = newReadString(os.Stdin)
	stdout = bufio.NewWriter(os.Stdout)
}

func main() {
	defer stdout.Flush()
	n := nint()
	r := fibonacci(n)
	fmt.Println(r)
}

func fibonacci(n int) int{
	if n == 0 || n == 1{
		return 1
	}else{
		fiList := make([]int, n+1)
		fiList[0] = 1
		fiList[1] = 1
		for i:=2; i<n+1; i++{
			fiList[i] = fiList[i-1] + fiList[i-2]
		}
		return fiList[n]

	}

}

func newReadString(ior io.Reader) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+11))
	r.Split(bufio.ScanWords)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

func nint64() int64 {
	i, err := strconv.ParseInt(nstr(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

func nint() int {
	return int(nint64())
}

func getIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = nint()
	}
	return b
}

func getStringSlice(n int) []string {
	b := make([]string, n)
	for i := 0; i < n; i++ {
		b[i] = nstr()
	}
	return b
}

func gcd(x, y int) int {
	if y == 0 {
		return x
	}
	return gcd(y, x%y)
}

func lcm(x, y int) int {
	return x * y / gcd(x, y)
}

func contains(s []int, e int) bool {
	for _, a := range s {
		if a == e {
			return true
		}
	}
	return false
}

func bin(i int, prefix bool) string {
	i64 := int64(i)

	if prefix {
		return "0b" + strconv.FormatInt(i64, 2)
	} else {
		return strconv.FormatInt(i64, 2)
	}
}

func strReverse(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}

	return string(runes)
}

Python: n = int(input())

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

print(fib[n])

Python: n = int(input())

MAX = 45
table = [0] * MAX
for i in range(MAX):
    # print(n)
    if i == 0 or i == 1:
        table[i] = 1
    else:
        table[i] = table[i - 1] + table[i - 2]

print(table[n])

Python: # -*- coding:utf-8 -*-


def memoize(proc):
    cache = {}

    def helper(*args, **kargs):
        if args not in cache:
            cache[args] = proc(*args, **kargs)
        return cache[args]

    return helper


@memoize
def fib(n):
    if n < 2:
        return 1
    else:
        return fib(n - 1) + fib(n - 2)


if __name__ == "__main__":
    print(fib(int(input())))

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

print(dp[-1])

Python: # 34

n = int(input())

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

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

print(dp[n])

Python: import sys
import itertools
# import numpy as np
import time
import math
 
sys.setrecursionlimit(10 ** 7)
 
from collections import defaultdict
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(input())

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

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

print(fib(N))

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

Python: n = int(input())
data = []
x = []

if n == 0:
    print('1')
data.append(1)
if n == 1:
    print('1')
data.append(1)

if n >= 2:
    for i in range(2, n+1):
    #print(sum(data[i-2:i+1]))
    #print(data[1])
    #data.append(data[i])
        x = sum(data[i-2:i+1])
        data.append(x)
    #print(i, x)
        i = i + 1
    print(x)

Python: #coding:utf-8
n = int(input())
F = [False for i in range(n+1)]
def fib(n):
    if n == 1 or n == 2:
        F[n] = 1
        return 1
    if F[n]:
        return F[n]
    F[n] = fib(n-2) + fib(n-1)
    return F[n]

a = fib(n)
print(a)

Python: N = int(input())
dp = [ -1 for x in range(50)]
def fib(n):
    if n == 0 or n == 1:
        dp[n] = 1
        return dp[n]
    if dp[n] != -1:
        return dp[n]
    dp[n] = fib(n-1)+fib(n-2)
    return dp[n]
print(fib(N))

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

Python: dp = {}


def fib(n):
    if n in dp:
        return dp[n]
    else:
        if n <= 1:
            dp[n] = 1
        else:
            dp[n] = fib(n-1) + fib(n-2)
        return dp[n]


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

Python: num = int(input())
fibtbl = [ 0 for x in range(50)]
fibtbl[0] = 1
fibtbl[1] = 1

def fib(n):
    global fitbl
    
    if n == 0:
        return 1
    if n == 1:
        return 1
    
    if fibtbl[n-1] != 0:
        p = fibtbl[n-1]
    else:
        p = fib(n-1)
    
    if fibtbl[n-2] != 0:
        pp = fibtbl[n-2]
    else:
        pp = fib(n-2)
    
    fibtbl[n] = p + pp
    return p + pp
    

print(fib(num))

Python: fib=[0]*45
fib[0]=1
fib[1]=1

n=int(input())

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

Python: import sys
#import numpy as np

#sys.setrecursionlimit(10**6)
#readline = sys.stdin.readline

n = int(input())

l = [1,1]

def f(i):
    global l
    if i <= 1:
        return 1
    else:
        return l[i-1] + l[i-2]

for i in range(2,n+1):
    l.append(f(i))

print(l[n])

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

Python: 
def fibonacci(n):
    global F

    if F[n] != -1:
        return F[n]
    elif n in [0, 1]:
        F[n] = 1
        return F[n]
    else:
        F[n] = fibonacci(n-1) + fibonacci(n-2)
        return F[n]


n = int(input())
F = [-1] * 45

print(fibonacci(n))

Python: from collections import deque
from enum import Enum
import sys
import math

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001

table = [0] * 45

table[0] = 1
table[1] = 1

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


N = int(input())
print("%d"%(table[N]))

Python: #!/usr/bin/python

n = int(input())

def fib(n):
    l = list()
    l.append(1)
    l.append(1)

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

    return l[i]

print(fib(n))

Python: n = int(input())

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


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

print(x[-1])

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

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

Python: n=int(input())
a=b=1
while n:
    a,b=b,a+b
    n-=1
print(a)

Python: A = [None] * (44 + 1)
A[0] = 1
A[1] = 1


def fibonacci(n: int) -> int:
	if A[n] == None:
		A[n] = fibonacci(n - 1) + fibonacci(n - 2)
	return A[n]


if __name__ == "__main__":
	n = int(input())
	print(fibonacci(n))

Python: n = int(input())

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

print(fib[n])

Python: def fib(n):
    n=int(n)
    F=[1,1]
    for i in range(1,n):
        F.append(F[i-1]+F[i])
    
    return F[n]

Python: N = int(input())
a = b = 1
while N:
    a, b = b, a+b
    N -= 1
print(a)

Python: def fibonacci(N, dp):
    if dp[N] != 0:
        return dp[N]
    if N == 1 or N == 0:
        dp[N] = 1
    else:
        dp[N] = fibonacci(N - 1, dp) + fibonacci(N - 2, dp)
    return dp[N]


def main():
    N = int(input())
    dp = [0] * (N + 1)
    print(fibonacci(N, dp))


if __name__ == '__main__':
    main()

Python: MAX_N = 44
dp = [None] * (MAX_N + 1)
dp[0] = 1
dp[1] = 1

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

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