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<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<queue>
#include<stack>
#include<cmath>	
#include<list>
#include<set>

constexpr auto PI = 3.14159265359;

using namespace std;

int main() {
	int N;
	cin >> N;
	int fibonacci[45];
	fibonacci[0] = 1;
	fibonacci[1] = 1;
	for (int i = 2; i <= N; ++i) {
		fibonacci[i] = fibonacci[i - 1] + fibonacci[i - 2];
	}
	cout << fibonacci[N] << endl;

	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string>
#include <vector>
#include <cctype>
#include <cstdio>
#include <iomanip>
#include <functional>
#include <stack>
#define PI 3.1415926535
#define INF 114514810
#define FOR(i, r, n) for(int i=(r); i<(n); i++) 
#define REP(i, n) FOR(i, (0), n)

using namespace std;

int n;

int fib(int k){
	if (k == 1 || k == 2) return 1;
	return fib(k - 1) + fib(k - 2);
}

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

C++: 
#include<iostream>

using namespace std;
typedef long long ll;

const int MAX = 45;

ll f[MAX];

ll fibonacci(long n) {

	if (f[n] != -1) return f[n];
	if (n < 2) return 1;

	ll fb = fibonacci(n - 1) + fibonacci(n - 2);
	f[n] = fb;

	return fb;
}


int main() {

	for (int i = 0;i < MAX;i++) f[i] = -1;

	int num;
	cin >> num;

	cout << fibonacci(num) << endl;

	return 0;
}

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

int F[45];

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

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

int a[45];
int n;
int main()
{
    cin>>n;
    int i;
    for(i=0;i<=n;i++){
        if(i==0||i==1)a[i]=1;
        else{
            a[i]=a[i-1]+a[i-2];
        }
    }
    cout<<a[n]<<endl;
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin>>n;
    int x=1,y=1;
    int ans=0;
    if(n==0||n==1){
        cout<<1<<endl;
        return 0;
    }
    for(int i=2;i<=n;i++){
        ans = x+y;
        x = y;
        y = ans;
    }
    cout<<ans<<endl;
}

C++: #include <iostream>
#include <cstring>
#include <algorithm>
#include <queue>
#include <cstdio>
#include <cstdlib>
using namespace std;

int main() {

    int n;
    cin >> n;

    int dp[50];
    dp[0] = 1, dp[1] = 1;

    for (int i = 2; i <= n; i++) {
        dp[i] = dp[i-1] + dp[i-2];
    }
    
    cout << dp[n] << endl;
    
    return 0;
}