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

memolist = [-1]*(N+1)
def fib(x):
    if memolist[x] == -1:
        if x == 0 or x == 1:
            memolist[x] = 1
        else:
            memolist[x] = fib(x - 1) + fib(x - 2)
    return memolist[x]

print(fib(N))

Python: #!/usr/bin/env python
from __future__ import division, print_function
from sys import stdin


def fibo(n):
    a, b = 1, 1
    while n:
        a, b = b, a + b
        n -= 1
    return a


print(fibo(int(stdin.readline())))

Python: n = int(input())


F = [0] * (n + 1)

F[0] = 1
F[1] = 1

for i in range(2, len(F)):
    F[i] = F[i - 1] + F[i - 2]

print(F[n])

Python: def fib(a, b, fiboli):
    if len(fiboli) < n:
        fiboli.append(fiboli[-1] + fiboli[-2])
        fib(fiboli[-1], fiboli[-1] + fiboli[-2], fiboli)
    else:
        print(fiboli[-1])
        print(fiboli)

n = int(input())
if n != 0 and n != 1:
    fibo_list = []
    fibo_list.append(n - 1)
    fibo_list.append(n - 2)
    fib(n - 1, n - 2, fibo_list)
else:
    print(1)

Python: class Fib():
    f = [1] * 50
    def fib(self, n):
        for i in range(2, n + 1):
            self.f[i] = self.f[i - 1] + self.f[i - 2]
        return(self.f[n])

x = Fib()
print(x.fib(int(input())))

Python: # -*- coding: utf_8 -*-

n = int(input()) + 1
arr = [-1] * n

arr[0] = 1
arr[1] = 1

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

print(arr[n - 1])

Python: import sys
sys.setrecursionlimit(10**7)

# n = int(input())
# a, b = map(int, input().split())
# int_list = list(map(int, input().split()))
# l = list(input().split())

mem = {}

def fib(n):
    if n == 0:
        return 1
    if n == 1:
        return 1
    if n not in mem.keys():
        res = fib(n-1) + fib(n-2)
        mem[n] = res
        return res
    else:
        return mem[n]

def solve():
    n = int(input())
    print(fib(n))

solve()

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

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

Python: 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)

N = int(input())
print(fib_memo(N))

Python: def main():
    N = int(input())
    if N <= 1:
        print(1)
        return
    fib = [0]*(N+1)
    fib[0], fib[1] = 1, 1
    for i in range(2, N+1):
        fib[i] = fib[i-1] + fib[i-2]
    print(fib[N])


if __name__ == "__main__":
    main()

Python: n=int(input())
a=[]
a.append(1)
a.append(1)

mamo =[-1]*100

for i in range(2,n+1):
	a.append(a[i-1]+a[i-2])
	i+=1
	# if mamo[i]!=-1
	

print(a[n])

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

Python: def fib(n):
    F = {0:1, 1:1}
    def fibonacci(n):
        ans = F.get(n,-1)
        if ans > 0: return ans
        F[n] = fibonacci(n-1) + fibonacci(n-2)
        return F[n]
    return fibonacci(n)
        
if __name__=='__main__':
    print(fib(int(input())))

Python: n = int(input().strip())
if n <= 1:
    print(1)
    raise SystemExit
prev1 = 1
prev2 = 1
for i in range(2, n+1):
    fib = prev2 + prev1
    prev2, prev1 = prev1, fib
print(fib)

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

Python: def fib2(n):
    a1, a2 = 1, 0
    while n > 0:
        a1, a2 = a1 + a2, a1
        n -= 1
    return a1


n = int(input())

print(fib2(n))

Python: class Fibonacci(object):
    memo = [1, 1]

    def get_nth(self, n):
        if n < len(Fibonacci.memo):
            return Fibonacci.memo[n]
        # print('fib({0}) not found'.format(n))
        for i in range(len(Fibonacci.memo), n+1):
            result = Fibonacci.memo[i-1] + Fibonacci.memo[i-2]
            Fibonacci.memo.append(result)
            # print('fib({0})={1} append'.format(i, result))
        return Fibonacci.memo[n]


if __name__ == '__main__':
    # ??????????????\???
    num = int(input())

    # ?????£??????????????°????¨????
    f = Fibonacci()
    result = f.get_nth(num)

    # ???????????????
    print('{0}'.format(result))

Python: def fib(n):
    if n==0 or n==1:
        return 1
    else:
        if f[n]!=0:
            return f[n]
        else:
            f[n]=fib(n-1)+fib(n-2)
            return f[n]
f=[0]*45
n=int(input())

print(fib(n))

Python: n = int(input())

memo = [0 for _ in range(45)]

def fib_memo(n):
    if memo[n] != 0:
        return memo[n]
    elif (n == 0) or (n == 1):
        return 1
    else:
        memo[n] = fib_memo(n-1) + fib_memo(n-2)
        return memo[n]
    
print(fib_memo(n))

Python: # Algorithms and Data Structures 1
# Fibonacci Numbers
# Name: Ryuya Asada
# ID: s1260064


def fibonacci(n) -> int:
    a = 0
    b = 1
    c = 0
    for i in range(1, n+1):
        c = a + b
        a = b
        b = c
    
    return c


def main():
    n = int(input())
    print(fibonacci(n))
    pass


if __name__ == "__main__":
    main()

Python: def fibonacci(n):
    if n == 0 or n == 1:
        return 1
    else:
        return fibonacci(n - 1) + fibonacci(n - 2)
        

print(fibonacci(int(input())))

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

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

Python: import sys

input = sys.stdin.readline


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

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

    ans = fib[n]
    print(ans)


if __name__ == "__main__":
    main()

Python: import sys
read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    N = int(readline())
    dp = [0] * 47
    dp[0] = 1
    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()