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

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

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

Python: n = int(input())

fib = [1]*(n+1)

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

Python: def fib(n):
    x=[1,1]
    for i in range(n+1):
        y=x[i]+x[i+1]
        x.append(y)
    print(x[n])
    
a=int(input())
fib(a)

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

Python: 
n=int(input())
f=[0]*45
def Fib(n):
    if n==0:
        return 1
    elif n==1:
        return 1
    else:
        if f[n]!=0:
            return f[n]
        else:
            f[n]=Fib(n-1)+Fib(n-2)
            return f[n]
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: y=[1,1]
n=int(input())
for i in range(0,n):
    a=y[i]+y[i+1]
    y.append(a)
print(y[n])

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

Python: memo = {} #メモ化されないと時間がかかる
def fib(n):
  if n == 0 or n == 1:
    return 1
  # else:
  #   return fib(n-1) + fib(n-2)
  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: #Fibonacci Number
#http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_10_A&lang=jp


class fibonacci:
    def __init__(self):
        self.result: List[int] = [-1]*1000
        return 
    def calc(self,n):
        if (n == 0 or n == 1):
            self.result[n] = 1
            return 1
        if (self.result[n] != -1):
            return self.result[n]
        self.result[n-1] = self.calc(n-1) 
        self.result[n-2] = self.calc(n-2)
        return self.result[n-1] + self.result[n-2]
n = int(input())

print (fibonacci().calc(n))

Python: ####
n = int(input())
memo = [-1]*(n+10)
def fib(i):
    if i==0 or i == 1:
        return 1
    if memo[i] != -1:
        return memo[i]
    memo[i] = fib(i-1) + fib(i-2)
    return memo[i]
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: N = int(input())
dp = [None] * (N + 1)

def fib(n):
    if dp[n] != None:
        return dp[n]
    if n == 0 or n == 1:
        dp[n] = 1
    else:
        dp[n] = fib(n - 2) + fib(n - 1)
    return dp[n]

print(fib(N))

Python: from functools import lru_cache

n = int(input())


@lru_cache(maxsize=None)
def rec(n):
    if n <= 1:
        return 1
    else:
        return rec(n - 1) + rec(n - 2)


print(rec(n))

Python: dp = [None for _ in range(50)]

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

n = int(input())
print(fib(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] = F[n-1] + F[n-2]
  return F[n]

n = int(input())
for i in range(n+1):
  result = fib(i)
print(result)

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: # -*- coding: utf-8 -*-
import sys
from functools import lru_cache
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: print('Yes' if b else 'No')
YESNO=lambda b: print('YES' if b else 'NO')

def main():
    @lru_cache()
    def fib(n):
        if n==0 or n==1:
            return 1
        return fib(n-1)+fib(n-2)
    print(fib(int(input())))
        

if __name__ == '__main__':
    main()

Python: n = int(input())
dp = [1] * (50)
for i in range(n):
    dp[i + 2] = dp[i + 1] + dp[i]

print(dp[n])

Python: 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 fib(n):
    a=[1,1]
    for i in range(2,n+1):
        a.append(a[i-2]+a[i-1])
        i+=1
    return a[-1]
    
n=int(input())
print(fib(n))

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

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

Python: n=int(input())

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

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

print(L[n])

Python: 


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

F = [-1] * 50
print(fibonacci(int(input())))

Python: def memolize(f):
    cache = {}

    def helper(x):
        if x not in cache:
            cache[x] = f(x)
        return cache[x]
    return helper

@memolize
def fib(n):
    if n == 0:
        return 1
    elif n == 1:
        return 1

    return fib(n - 1) + fib(n - 2)

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

Python: n = int(input())
  
def fibonacci(n):
  if n <= 1:
    dp[n] = 1
    return 1
  if dp[n] != -1:
    return dp[n]
  else:
    dp[n] = fibonacci(n-1)+fibonacci(n-2)
    return dp[n]
dp = [-1]*(n+1)
fibonacci(n)
print(dp[-1])

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

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

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 main():
    n = int(input())
    dp = [0] * 100
    dp[0] = 1
    dp[1] = 1
    for i in range(2, len(dp)):
        dp[i] = dp[i - 1] + dp[i - 2]
    print(dp[n])


if __name__ == '__main__':
    main()

Python: a = int(input())
f1 = int(2)
f2 = int(1)
f = int(1)
if a == 1:
  print("1")
elif a == 2:
  print("2")
else:
  for b in range(2,a):
    f= f1+f2
    f2 = f1
    f1 = f
  print(f)