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>
#define REP(i,n) for(int i=0; i<n; ++i)
#define ALL(x) (x).begin(),(x).end()
#define ALLR(x) (x).rbegin(),(x).rend()
#define F first
#define S second
#define PB push_back
#define MP make_pair 
using namespace std;
typedef unsigned long ul;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vii;
typedef pair<int, int> pi;
const int INF = 100100100;
const unsigned int MOD = 1000000007;

bool is_prime(int n) { for (int i = 2; i*i <= n; ++i) { if (n % i == 0) return false; } return true; }
template<class T> inline void chmin(T& a, T b) { if (a > b) { a = b; } }
template<class T> inline void chmax(T& a, T b) { if (a < b) { a = b; } }

ll dp[50];
int N;

int main() {
    cin >> N;
    REP(i, 50) dp[i] = 0;
    dp[0] = 1; dp[1] = 1;
    
    for(int i = 2; i < 50; ++i) {
        dp[i] = dp[i - 1] + dp[i - 2];    
    }
    
    cout << dp[N] << endl;
}

C++: #include<bits/stdc++.h>
using namespace std;


int fib(int n , int t , int p1 , int p2){

  if( n==t )return p1+p2;

  return fib(n+1,t,p2,p1+p2);
  
}


int main(){

  int n;

  cin >> n;

  if(n==0 || n==1)cout << 1 << endl;
  else
    cout << fib(2,n,1,1) << endl;

  return 0;
}

C++: #include <stack>
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
using namespace std;
int gcd(int a, int b)
{
   if (a%b == 0)
   {
       return(b);
   }
   else
   {
       return(gcd(b, a%b));
   }
}
int mod = 1000000000 + 7;
int lcs(string x, string y){
    
    int m = x.size();
    int n = y.size();
    int c[m+1][n+1];
    int Max = 0;
    string X = " " + x;
    string Y = " " + y;
    for(int j = 0; j <= m; j++){
        c[j][0] = 0;
    }
    for(int j = 1; j <= n; j++){
        c[0][j] = 0;
    }
    for(int i = 1; i <= m; i++){
        for(int j = 1; j <= n; j++){
            if(X[i] == Y[j]){
                c[i][j] = c[i-1][j-1] + 1;
            }else{
                c[i][j] = max(c[i-1][j], c[i][j-1]);
            }
            Max = max(Max, c[i][j]);
        }
    }
    
    return Max;
}
int main(){
    //std::stack<int> stack;
    
    int n;
    cin >> n;
    vector<int> fib(45);
    fib[0] = 1;
    fib[1] = 1;
    for(int i = 2; i < 45; i++){
        fib[i] = fib[i-1] + fib[i-2];
    }
    cout << fib[n] << endl;
}

C++: #include <iostream>

using namespace std;

int main() {

    int fib[50];
    fib[0] = fib[1] = 1;

    for (int i = 2; i <= 44; ++i) fib[i] = fib[i-1] + fib[i-2];

    int n;
    cin >> n;

    cout << fib[n] << endl;

    return 0;
}

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

int fib(int n);

vector<long long> fib_n(100, 0);

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

int fib(int n) {
  if (fib_n[0] == 0) {

    fib_n[0] = 1;
    fib_n[1] = 1;
  }
  if (n == 0) {
    return fib_n[0];
  }
  if (n == 1) {
    return fib_n[1];
  }
  if (fib_n[n] == 0) {
    fib_n[n] = fib(n - 1) + fib(n - 2);
  }
  return fib_n[n];
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
int fib(int n){
  if(n==0) return 1;
  if(n==1) return 1;
  return fib(n-1)+fib(n-2);
}

int main() {
  int n;
  scanf("%d",&n);
  printf("%d\n",fib(n));
}