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: n = int(input())


def fibonacci(n):
    a,b = 1,1
    if n == 0 or n == 1:
        return 1

    else:
        for i in range(n-1):
            a,b = b,a+b
        
        return b

print(fibonacci(n))

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

Python: Fib = [1,1]

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

n = int(input())
print(Fib[n])

Python: def fib(n):
    memo = [0 for _ in range(n+1)]
    memo[0] = 1
    memo[1] = 1
    
    for i in range(n-1):
        memo[i+2] = memo[i+1] + memo[i]
            
    return memo[n]

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

Python: n = int(input())

def fib(n):
    dp = [0] * (n+1)
    dp[0] = 1
    dp[1] = 1

    def fib_sub(n):
        if dp[n] != 0:
            return dp[n]

        fibn1 = fib_sub(n-1)
        fibn2 = fib_sub(n-2)
        dp[n-1] = fibn1
        dp[n-2] = fibn2
        return fibn1 + fibn2

    return fib_sub(n)
print(fib(n))

Python: a=1
b=1
c=[]
n = int(input())

c.append(a)
c.append(b)

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

Python: n = int(input())

dict = {0:1,1:1}

def fib(n):
    if n in dict.keys():
        return dict[n]
    else:
        dict[n] = fib(n-1) + fib(n-2)
        return dict[n]

print(fib(n))

Python: N=int(input())
DP=[0]*(N+1)
def fin(n):
    if DP[n]!=0:
        return DP[n]
    if n<=1:
        DP[n]=1
        return DP[n]
    else:
        DP[n]=fin(n-1)+fin(n-2)
        return DP[n]
print(fin(N))

Python: n = int(input())
f1 = 1
f2 = 1
ans = 0
if n == 0 or n == 1:
    ans = 1
else:
    for i in range(n-1):
        if i%2 == 0:
            f1 = (f1 + f2)
            ans = f1
            #print(f1, f2)
        else:
            f2 = (f1 + f2)
            ans = f2
            #print(f1, f2)
print(ans)

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)
  return F[n]

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

Python: p,n=(1+5**.5)/2,int(input())+1
print(int((p**n-(1-p)**n)/5**.5))

Python: def fibonum():
    global F
    F[0]=1
    F[1]=1
    for i in xrange(2,n+1):
        F[i]=F[i-1]+F[i-2]
    return F[n]

n=input()
F=[0]*(n+1)
num=fibonum()
print(num)

Python: def fibo(n):
	S=[1,1]
	s=1
	if n>1:
		for i in range(2,n+1):
			S.append(S[i-1]+S[i-2])
			s=S[i]
	return s

def main():
	if __name__=="__main__":
		n=int(input())
		print(fibo(n))

main()

Python: a=b=1
for _ in range(int(input())): a,b=b,a+b
print(a)

Python: memo=[0]*50

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

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

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: from functools import lru_cache


@lru_cache(None)
def fibo(n: int):
    if n == 0 or n == 1:
        return 1
    else:
        return fibo(n - 1) + fibo(n - 2)


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

Python: def fib(F, n):
    if n == 0:
        return 1    
    if n == 1:
        return 1
    else:
        F.append(fib(F, n-1) + F[n-2])
        return F[n]

n = int(input())
F = [1, 1]
ans = fib(F, n)
print(str(ans))

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: import sys
input = sys.stdin.readline

def fibo(i, dp):
	if dp[i] != -1:
		return dp[i]
	dp[i] = fibo(i-1, dp) + fibo(i-2, dp)
	return dp[i]

def main():
	n = int(input().strip())
	dp = [-1 for i in range(n+1)]
	dp[0] = 1
	dp[1] = 1
	print(fibo(n, dp))

if __name__ == '__main__':
	main()

Python: n = int(input())

fib = [-1] * (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])

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

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

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

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

Python: def fib(n):
    if n==0:
        return 1
    elif n==1:
        return 1
    else:
        a,b=1,2
        for i in range(n-2):
            a,b=b,a+b
        return b    

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

Python: a=[1,1]
def fib(n):
    try:
        return a[n]
    except:
        a.append(fib(n-2)+fib(n-1))
        return a[n]
n=int(input())
print(fib(n))

Python: import numpy as np
def f(n):
        m = np.matrix('1 1 ; 1 0') ** n
        return m.item(0)
print(f(int(input())))

Python: def main():
    """ ????????? """
    num = int(input().strip())
    F = []
    for n in range(num+1):
        if n < 2:
            F.append(1)
        else:
            F.append(F[n-1] + F[n-2])
    print (F[num])
if __name__ == '__main__':
    main()

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


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


print(fib(n))

Python: f=lambda n:f(n-1)+f(n-2)if n>1 else 1
print(f(int(input())))

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

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

Python: fib = [1]*100

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

Python: #(40)フィボナッチ数列
n=int(input())
def fib(n):
    a=1
    b=1
    for _ in range(n):
        a,b=b,a+b
    return a
print(fib(n))

Python: def fibo(n):
	S=[1,1]
	s=1
	if n>1:
		for i in range(2,n+1):
			S.append(S[i-1]+S[i-2])
			s=S[i]
	return s

def main():
	if __name__=="__main__":
		n=input()
		print(fibo(n))

main()