Go: package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scan(&n)

	fibo := make([]int, n+1)
	fibo[0] = 1
	fibo[1] = 1

	for i := 2; i <= n; i++ {
		fibo[i] = fibo[i-1] + fibo[i-2]
	}

	fmt.Println(fibo[n])
}

C++: #include<stdio.h>
int a[10000]={1,1,2};
int digui(int n){
if(a[n])return a[n];
return digui(n-1)+digui(n-2);
}
int main(){
int n;
scanf("%d",&n);
printf("%d",digui(n));
return 0;
}

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

vector<int> memo(45,-1);
int fib(int n){
    if(n==0||n==1) return 1;
    if(memo.at(n)!=-1) return memo.at(n);
    return memo.at(n)=fib(n-1)+fib(n-2);
}

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

C++: #include <iostream>
#include <vector>
#include <cstdio>
 
using namespace std;
 
typedef long long ll;
#define FOR(i,a,b) for(int i=(a);i<(int)(b);++i)
#define rep(i,n) FOR(i,0,n)

int dp[50];

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

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

C++: #include <iostream>

using namespace std;

int fib(int n);

int main() {
int n;
int dfep[45];

dp[0] = 1;
dp[1] = 1;

cin >> n;

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

cout << dp[n] << dp << endl;
return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <map>
#include <string>
#include <queue>
#include <stack>
#include <math.h>
#include <cmath>
#include <numeric>
#include <iomanip>


#define log(x) cout<<x<<endl
#define pb push_back
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
typedef long long lint;
using namespace std;

int gcd(lint x, lint y){
  return y==0 ? x:gcd(y,x % y);
}


int digsum(int n) {
  int res = 0;
  while(n > 0) {
    res += n%10;
    n /= 10;
  }
  return res;
}


int dignum(int n) {
  int res = 0;
  while(n > 0) {
    res++;
    n /= 10;
  }
  return res;
}


int stringcount(string s, char c) {
  return count(s.cbegin(), s.cend(), c);
}


int lcm(lint x, lint y){
  return x/ gcd(x, y) * y;
}


int combi(int n, int r){
  int num = 1;
  for(int i = 1; i <= r; i++){
    num = num * (n - i + 1) / i;
  }
  return num;
}


int main(){
  lint n;
  vector<lint> l;
  cin>>n;
  l.pb(1);
  l.pb(1);
  for(lint i=2;i<=n;i++) l.pb(l[i-1]+l[i-2]);
  cout<<l[n]<<endl;
}