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())
dp = [0]*(n+1)

def calc(n):
    global dp
    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]

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

#print(fibonacci(n))
calc(n)
print(dp[n])

Python: n = int(input())

d = {0:1,1:1}
def calc(n):
    if n not in d:
        d[n] = calc(n-2)+calc(n-1)
    return d[n]

for i in range(n):
    calc(i)

print(calc(n))

Python: n = int(input())
if n < 2:
    print(1)
else:
    a, b = 1, 1
    for k in range(n - 1):
        a, b = b, a + b
    print(b)

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

fibo_list = []
n = int(input())
fibo_list.append(n-2)
fibo_list.append(n-1)

fib(n - 2, n - 1, fibo_list)

Python: n = int(input())
dp = [0] * (n + 1)
dp[0] = 1
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())

F = [0]*50
F[0] = 1
F[1] = 1
if n== 0 or n==1:
    print(F[n])
else:
    for i in range(2,n+1):
        F[i] = F[i-1]+ F[i-2]
    print(F[n])

Python: N = int(input())
x = [0]*(N+1)
def fibo(n):
    if n ==0 or n==1:
        return 1
    else:
        if x[n] != 0:
            return x[n]
        else:
            x[n] = fibo(n-1)+fibo(n-2)
            return x[n]
print(fibo(N))

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

Python: answer_list = [1, 1] + [None] * 43

def fib(num):
    ans = answer_list[num]
    if ans:
        return ans
    ans = fib(num - 1) + fib(num - 2)
    answer_list[num] = ans
    return ans


n = int(input())

print(fib(n))

Python: # https://onlinejudge.u-aizu.ac.jp/problems/ALDS1_10_A

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

    if n == 0 or n == 1:
        result = 1
    else:
        A = [1] * (n + 1)

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

        result = A[n]

    print(result)

Python: def fib(n):
    fib.cache = vars(fib).setdefault("cache", {})

    def f(n):
        if n <= 1:
            return 1
        else:
            return fib(n - 1) + fib(n - 2)

    if n not in fib.cache:
        fib.cache[n] = f(n)
    return fib.cache[n]


def main():
    print(fib(int(input())))


if __name__ == '__main__':
    main()

Python: # coding: utf-8
memo={}
def fib(n):
    if n==0 or n==1:
        return 1
    else:
        if n-1 not in memo:
            memo[n-1]=fib(n-1)
        if n-2 not in memo:
            memo[n-2]=fib(n-2)
        return memo[n-1]+memo[n-2]

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

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: F = {}

def fib(n):
  global F
  if n < 0:
    print("error")
    exit()
  if n < 2:
    F[n] = 1
    return F[n]
  F[n] = fib(n-1) + fib(n-2)
#  F[n] = F[n-1] + F[n-2]
  return F[n]

n = int(input())
print(fib(n))
#n = int(input())
#print(fib(n))
#fib(44)
#for i in range(44+1):
#  print(fib(i))
#  print(F[i])

Python: 
f = [-1]*45
f[0]=1
f[1]=1

def fib(i):
    global f

    if i<=1:
        return f[i]
    if f[i] == -1:
        f[i] = fib(i-1)+fib(i-2)
    return f[i]

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

Python: n = int(input())
dp = [0]*(n+1)
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: N = int(input())

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

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

print(dp[N])

Python: N = int(input())
a, b = 1, 1
n = 0
while n <= N:
  if n > 1:
    a, b = b, a + b
  n += 1

print(b)

Python: n = int(input())
memo = [None]*(n+1)

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

Python: n = int(input())

fib = [0] * 45

for i in range(len(fib)):
    if i == 0 or i == 1:
        fib[i] = 1
    else:
        fib[i] = fib[i-1] + fib[i-2]

    if i == n:
        print(fib[i])
        break

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

Python: import sys
input = lambda: sys.stdin.readline().rstrip() 

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

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

    print(fib[n])

if __name__ == '__main__':
    resolve()

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

print(fib[n])

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

    pre = 1
    cur = 1

    for _ in range(n-1):
        tmp = cur
        cur = pre + cur
        pre = tmp

    print(cur)


if __name__ == '__main__':
    main()

Python: n = int(input())
memo = [-1 for i in range(n+1)]

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

print(fib(n))

Python: def fib(n,memo={}):
    if n == 0:
        return 1
    elif n == 1:
        return 1
    elif n in memo:
        return memo[n]
        
    else:
        memo[n]=fib(n-1,memo)+fib(n-2,memo)
        return memo[n]
a=int(input())
print(fib(a))

Python: answer_list = [1, 1] + [None] * 43

def fib(num):
    ans = answer_list[num]
    if ans:
        return ans
    ans = fib(num - 1) + fib(num - 2)
    answer_list[num] = ans
    return ans


n = int(input)

print(fib(n))

Python: N = int(input())
F = [0 for i in range(N+1)]


def fib(n):
    if n == 0 or n == 1:
        F[n] = 1
        return F[n]

    if F[n]:
        return F[n]

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


def main():
    print(fib(N))


if __name__ == '__main__':
    main()