Go: package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
	"strconv"
)

const (
	initialBufSize = 100000
	maxBufSize     = 1000000
)

var sc *bufio.Scanner

func initScanner(r io.Reader) *bufio.Scanner {
	buf := make([]byte, initialBufSize)

	sc := bufio.NewScanner(r)
	sc.Buffer(buf, maxBufSize)
	sc.Split(bufio.ScanWords) // bufio.ScanLines
	return sc
}

func main() {
	sc = initScanner(os.Stdin)
	fmt.Println(resolve(parseProblem()))
}

func parseProblem() int {
	return scanInt(sc)
}

func resolve(n int) int {
	dp := make([]int, n+1)
	dp[0], dp[1] = 1, 1
	for i := 2; i <= n; i++ {
		dp[i] = dp[i-1] + dp[i-2]
	}
	return dp[n]
}

// snip-scan-funcs
func scanInt(sc *bufio.Scanner) int {
	sc.Scan()
	i, _ := strconv.Atoi(sc.Text())
	return int(i)
}
func scanString(sc *bufio.Scanner) string {
	sc.Scan()
	return sc.Text()
}

C++: #include <algorithm>
#include <cassert>
#include <climits>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <string>
#include <vector>

#define all(x) begin(x), end(x)

using namespace std;

template <typename T> T gcd(T a, T b) {
  if (a % b == 0) {
    return b;
  } else {
    return gcd(b, a % b);
  }
}

template <typename T> T lcm(T a, T b) { return a * b / gcd(a, b); }

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

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

C++: /*
    ????????°??§???????????¨????????????
*/

#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <limits.h>
#include <float.h>
#include <iostream>
#include <algorithm>
#include <string>
#include <iterator>
#include <vector>
#include <map>
#include <utility>
#define LLU unsigned long long int
#define LL long long int
#define LD long double
using namespace std;
#define Lfmax DBL_MAX
#define LLUmax ULLONG_MAX
#define LLmax LLONG_MAX
#define dmax INT_MAX
#define vd vector<int>
#define vLL vector<long long int>
#define vLLU vector<unsigned long long int> 
#define pb push_back
#define mp make_pair
#define fi first
#define sec second
#define debug printf("asd\n")
#define debugd(a) printf("--%d\n",a)
#define debugdd(a,b) printf("--%d %d\n",a,b)
#define debugarr(a,b) for(int i=0 ; i<b ; i++)printf("%d ",a[i]);printf("\n")
#define newline printf("\n")
#define forin(a,b,c) for(int a=b ; a<c ; a++)
#define forde(a,b,c) for(int a=b ; a>=c ; a--)


inline void scd(int &a){scanf("%d",&a);}
inline void scdd(int &a,int &b){scanf("%d %d",&a,&b);}
inline void sctd(int &a,int &b,int &c){scanf("%d %d %d",&a,&b,&c);}
inline void scdlld(LL &a,LL &b){scanf("%I64d %I64d",&a,&b);}
inline void sclld(LL &a){scanf("%I64d",&a);}

#define scarrd(a,b) for(int index=0 ; index<b ; index++)scanf("%d",&a[index])
#define prdlld(a,b) printf("%I64d %I64d",a,b)
#define prdd(a,b) printf("%d %d",a,b)
#define prd(a) printf("%d",a)
#define prarr(a,b) for(int i=0 ; i<b ; i++)printf("%d ",a[i])
#define iniarr(a,b) for(int i=0 ; i<b ;i++)a[i]=0
#define arr(a,b) int *a=(int *)malloc(b*sizeof(int))
#define llarr(a,b) long long int *a=(long long int *)malloc(b*sizeof(long long int))
#define st(a,b) char *a=(char *)malloc(b*sizeof(char))
#define grav 9.8
#define pi 3.14159265

int fbc[200000];

int fb(int a)
{
	if(fbc[a]>0)
	return fbc[a];
	
	
	if(a<2)
	return 1;
	
	fbc[a]=fb(a-1)+fb(a-2);
	return fbc[a];
	
}

int main()
{
	iniarr(fbc,200000);
	int a;
	scd(a);
	printf("%d\n",fb(a));	
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
    vector<int> dp;
    dp.push_back(1),dp.push_back(1);
    for(int i=0;i<44;i++)dp.push_back(dp[i]+dp[i+1]);
    int N;scanf("%d",&N);
    printf("%d\n",dp[N]);
    return 0;
}

C++: #include <bits/stdc++.h>
#define int long long
typedef long long ll;
using namespace std;

ll N, M, score=0;
vector<ll> Fib;

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

signed main(){
    cin >> N;
    Fib.resize(N+1);
    Fib[0]=1;
    Fib[1]=1; 
    dp();
    cout << Fib[N] << endl;
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
const int INF_INT = 2147483647;
const long long INF_LONG = 9223372036854775807;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
     
int main() {
  int n;  cin >> n;

  vector<ll> v(100);
  v[0] = 1;
  v[1] = 1;

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

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

C++: #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for(int i = 0; i < n; i++)
#define all(a) a.begin(), a.end()
#define P pair<int, int>
#define F first
#define S second
#define prime 1000000007
#define INF 40000000000000000
int dx8[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
int dy8[8] = {1, 1, 1, 0, -1, -1, -1, 0};
int dx4[4] = {-1, 0, 1, 0};
int dy4[4] = {0, -1, 0, 1};
signed main(void) {
    int fib[48];
    fib[0] = 1;
    fib[1] = 1;
    rep(i, 45) fib[i + 2] = fib[i + 1] + fib[i];
    int n;
    cin >> n;
    cout << fib[n] << endl;
}

C++: // fibonacci
#include<iostream>
#define MAX 50
long f(long);
long F[MAX],n;
int main(){
  long i;
  std::cin >> n;
  for(i=0; i<MAX; i++) F[i] = -1;
  std::cout << f(n) << "\n";
  return 0;
}
long f(long n){
  if(n == 1 || n == 0) return F[n] = 1;
  if(F[n] != -1) return F[n];
  return F[n] = f(n - 2) + f(n - 1);
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (int)(n); i++)


int main() {
  int n;
  cin >> n;
  vector<int> fibo(n);
  
  for(int i = 0;i < n;i++){
      if(i == 0){
          fibo.at(i) = 1;
      }else if(i == 1){
          fibo.at(i) = 2;
      }else{
          fibo.at(i) = fibo.at(i-1)+fibo.at(i-2);
      }
  }
  cout << fibo.at(n-1) << endl;
  
}

C++: #include<iostream>
#include<cstdio>
#include<string>
#include<algorithm>

using namespace std;

int fib_t[45] = {0};

int fib(int i){
    if (i <= 1) return 1;
    if (fib_t[i] != 0) return fib_t[i];
    int nacci;
    nacci = fib(i-1) + fib(i-2);
    fib_t[i] = nacci;
    
    return nacci;
}

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

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

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

  int n;
  scanf("%d",&n);

  printf("%d\n",fib[n]);
}