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

C++: #include "bits/stdc++.h"
#include <unordered_set>

#define _CRT_SECURE_NO_WARNINGS

#define REP(i, n) for(decltype(n) i = 0; i < (n); i++)
#define REP2(i, x, n) for(decltype(x) i = (x); i < (n); i++)
#define REP3(i, x, n) for(decltype(x) i = (x); i <= (n); i++)
#define RREP(i, n) for (decltype(n) i = (n) - 1; i >= 0; i--)

#define ALL(a) (a).begin(),(a).end()
#define SORT(c) sort((c).begin(),(c).end())
#define DESCSORT(c) sort(c.begin(), c.end(), greater<int>())

using namespace std;

const int INF = 1000000000;
const double PI = 3.1415926535897932384626433832795;

// N, E, S, W
const int dx[4] = { -1, 0,  1,  0 };
const int dy[4] = { 0, 1,  0, -1 };

using LL = long long int;
using LD = long double;
using pii = pair<int, int>;
using pdd = pair<double, double>;
using pll = pair<LL, LL>;
using vi = vector<int>;
using vd = vector<double>;
using vvi = vector<vi>;
using vll = vector<LL>;

//==============================================
vi dp(94);

int fib(int n) {
	if (n == 0 || n == 1) return dp[n] = 1;
	if (dp[n] != -1) return dp[n];
	return dp[n] = fib(n - 1) + fib(n - 2);
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	int n;
	cin >> n;
	
	REP2(i, 1, n + 1)  dp[i] = -1;
	cout << fib(n) << "\n";
	return 0;
}

C++: #include <iostream>
#include <vector>

using namespace std;

vector<int> F(45, -1);

int fib(int n)
{
  if (!n || n == 1) return F[n] = 1;
  if (F[n] != -1) return F[n];

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

int main()
{
  int n;
  cin >> n;

  cout << fib(n) << endl;

  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int a[44];
  a[0]=1;
  a[1]=1;
  for(int i=2;i<=44;i++)a[i]=a[i-1]+a[i-2];
  int n;
  cin>>n;
  cout<<a[n]<<endl; 
  return 0;
}

C++: #include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;

int main() {
    vector<int> fibs(45);
    fibs[0] = fibs[1] = 1;
    for (int i = 2; i <= 44; i++) {
        fibs[i] = fibs[i - 1] + fibs[i - 2];
    }
    int n;
    cin >> n;
    cout << fibs[n] << endl;
}

C++: #include <iostream>
#include <stack>
#include <queue>
#include <list>
#include <string>
#include <cstdlib>
#include <algorithm>
using namespace std;

int main()
{
	int n;
	cin >> n;

	int F[50];

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

	for (int i = 2; i <= n; i++) {
		F[i] = F[i - 1] + F[i - 2];
	}

	cout << F[n] << endl;
}

C++: #include "bits/stdc++.h"

using namespace std;

using ll = long long;
using ld = long double;
using P = pair<string, int>;
constexpr ld EPS = 1e-12;
constexpr int INF = numeric_limits<int>::max() / 2;
constexpr int MOD = 1e9 + 7;

template <typename T>
void printv(const vector<T> &v)
{
    int sz = v.size();
    for (int i = 0; i < sz; i++)
    {
        cout << v[i] << " \n"[i == sz - 1];
    }
}

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);

    vector<ll> res(50);
    res[0] = res[1] = 1;
    for (int i = 2; i <= 44; i++)
        res[i] = res[i - 1] + res[i - 2];
    int n;
    cin >> n;
    cout << res[n] << endl;
}

C++: #include <iostream>

using namespace std;

int A[128];
int fib(int n){
  A[0] =1;
  A[1] =2;
  for(int i=2;i<44;++i){
    A[i] =A[i-1];
    if(i>1)A[i]+=A[i-2];
  }
  return A[n-1];

}
int main(){
  int n;
  cin >> n ;
  cout <<fib(n)<<endl;
}

C++: #include <iostream>
using namespace std;

int fibonacci(int n){
	if(n==0) return 1; //たぶん本当はフィボナッチ数列はf(0)=0 だと思うのだが、問題文がそうなっていたので１を返す。
	else if(n==1) return 1;
	else return fibonacci(n-2) + fibonacci(n-1);
}

int fibonacci_dp(int n){
	int i;
	int fib[45];

	fib[0]=1;
	fib[1]=1;

	for(i=2; i<=n; i++){
		fib[i]=fib[i-2]+fib[i-1];
	}
}

int main() {
	int n;

	cin >> n;
	//cout << fibonacci(n) << endl;
	cout << fibonacci_dp(n) << endl;

	return 0;
}

C++: #include <iostream> 

using namespace std;
int main()
{
	int f[100];
	int n;
	cin >> n;
	f[0] = 1;
	f[1] = 1;
	for(int i = 0; i < n; i++)
	{
		f[i+2] = f[i+1] + f[i];
	}
	cout << f[n] << endl;
    return 0;
}

C++: #include <iostream>
#include <map>

std::pair<int, int> FibonacciPair(int Index)
{
	if(Index == 0) return std::make_pair(0, 1);
	if(Index == 1) return std::make_pair(1, 1);
	std::pair<int, int> Prev = FibonacciPair(Index - 1);
	return std::make_pair(Prev.second, Prev.first + Prev.second);
}

int FibonacciNumber(int Index)
{
	return FibonacciPair(Index).second;
}

int main()
{
	int Index;
	std::cin >> Index;
	std::cout << FibonacciNumber(Index) << std::endl;
	return 0;
}

C++: #include <iostream>

int fib(int, int[]);

int main()
{
	int n;
	const int size = 44;
	int memo[size + 1];

	for (int i = 0; i < size + 1; i++)
	{
		memo[i] = -1;
	}

	std::cin >> n;

	std::cout << fib(n, memo) << std::endl;

	return 0;
}

int fib(int n, int memo[])
{
	int ans;

	if (n == 0 || n == 1) {
		return 1;
	}
	else {
		if (memo[n] != -1) {
			return memo[n];
		}
		else {
			ans = fib(n - 1, memo) + fib(n - 2, memo);
			memo[n] = ans;
		}
	}

	return ans;
}

C++: #include <iostream>
using namespace std;

int fib(int n){
  int n1,n2,t;
  n1 = n2 = t = 1;
  for(int i = 1;i < n;i++){
    t = n1 + n2;
    n1 = n2;
    n2 = t;
  }

  return t;
}

int main(){
  int n;

  cin >> n;
  cout << fib(n) << endl;

  return 0;
}

C++: #include<stdio.h>
 
#define Max 45
 
int F[Max];
 
int fibonacci(int n){
  if( n == 0 || n == 1)
    return F[n] = 1;
  if( F[n] != NULL ) 
    return F[n];
  return F[n] = fibonacci(n - 2) + fibonacci(n - 1);
}
 
int main(){
 
  int n, i, A;
 
  scanf("%d",&n);
 
  for( i = 0 ; i <= n  ; i++)
    A = fibonacci(i);
 
  printf("%d\n",A);
 
  return 0;
}

C++: #include<iostream>
using namespace std;

int main() {
  int n; cin >> n;
  int F[50];
  F[0] = F[1] = 1;
  for (int i = 2; i <= n; i++) F[i] = F[i - 1] + F[i - 2];

  cout << F[n] << endl;

  return 0;
}