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: # ALDS_10_A - フィボナッチ数

n = int(input())

dp = [0] * (n + 1)

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

print(dp[-1])
# print(dp)

Python: def main():
    def fib(n):
        a = 1
        b = 1
        if n == 0:
            return a
        elif n == 1:
            return b
        else:
            for i in range(n-1):
                a, b = b, a + b
            return b
    
    n = int(input())
    print(fib(n))
        
if __name__ == '__main__':
    main()

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: import sys
n = int(input())
if n < 2:
    print(1)
    sys.exit()
a, b = 1, 1
for i in range(n-1):
    c = a + b
    a = b
    b = c
print(c)

Python: n = int(input())

A = [1]*(n+1)

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

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

Python: #!/usr/bin/python

n = int(input())

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

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

    return l[i]

print(fib(n))

Python: def fibonacci(n):
    num1 = 1
    num2 = 1
    tmp = 1

    for i in range(1, n):
        tmp = num1 + num2
        num1 = num2
        num2 = tmp

    return tmp


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

Python: n=int(input())

dp=[1,1]
def fib(n):
    if n==0 and n==1:
        return dp[n]
    for i in range(2,n+1):
        dp.append(dp[i-1]+dp[i-2])
    return dp[n]
print(fib(n))

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: #!/usr/bin/env python3
# -*- coding: utf-8 -*-

# https://qiita.com/e869120/items/eb50fdaece12be418faa
# http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_10_A&lang=ja


def main():
    n = int(input().strip())
    print(fib(n))


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


if __name__ == '__main__':
    main()

Python: def fib(n, fib_memo=None):                                                                                                                                                    
    if fib_memo == None:                                                                                                                                                      
        fib_memo = [None]*n                                                                                                                                                   
    if n <= 1:                                                                                                                                                                
        return 1                                                                                                                                                              
    else:                                                                                                                                                                     
        if fib_memo[n-1] == None:                                                                                                                                             
            fib_memo[n-1] = fib(n-1, fib_memo)                                                                                                                                
        if fib_memo[n-2] == None:                                                                                                                                             
            fib_memo[n-2] = fib(n-2, fib_memo)                                                                                                                                
        return fib_memo[n-1] + fib_memo[n-2]                                                                                                                                  
                                                                                                                                                                              
                                                                                                                                                                              
if __name__ == '__main__':                                                                                                                                                    
    n = input()                                                                                                                                                               
    print(fib(int(n)))

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

Python: N = int(input())

dp = [1] * (N + 1)

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

print(dp[N])

Python: _fib = [1, 1]

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

_n = int(raw_input())
print(fib(_n))

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

Python: n=int(input())

fib=[0]*(n+1)
fib[0]=1
fib[1]=1

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

Python: # -*- coding: utf-8 -*-
 
 
def main(n):
    lst = []
    lst.append(1)
    lst.append(1)
    for i in range(2, n + 1):
        lst[i] = lst[i - 1] + lst[i - 2]
    return lst[n]
 

if __name__ == '__main__': 
    n = int(input())
    print(main(n))

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

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

Python: F =[1,1] + [0 for i in range(44)]

n = int(input())

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

print(F[n])