Go: package main

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

// I/O
type Scanner struct {
	sc *bufio.Scanner
}

func NewScanner() *Scanner {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 1024), int(1e+9))
	return &Scanner{sc}
}

func (s *Scanner) nextStr() string {
	s.sc.Scan()
	return s.sc.Text()
}

func (s *Scanner) nextInt() int {
	i, e := strconv.Atoi(s.nextStr())
	if e != nil {
		panic(e)
	}
	return i
}

func (s *Scanner) nextFloat() float64 {
	f, e := strconv.ParseFloat(s.nextStr(), 64)
	if e != nil {
		panic(e)
	}
	return f
}

func (s *Scanner) nextRuneSlice() []rune {
	return []rune(s.nextStr())
}

func (s *Scanner) nextIntSlice(n int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = s.nextInt()
	}
	return res
}

func (s *Scanner) nextFloatSlice(n int) []float64 {
	res := make([]float64, n)
	for i := 0; i < n; i++ {
		res[i] = s.nextFloat()
	}
	return res
}

// Arithmetic
func max(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m < i {
			m = i
		}
	}
	return m
}

func min(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m > i {
			m = i
		}
	}
	return m
}

func abs(x int) int {
	if x > 0 {
		return x
	}
	return -x
}

func pow(x, y int) int {
	res := 1
	for i := 0; i < y; i++ {
		res *= x
	}
	return res
}

func ceil(a, b int) int {
	if a%b == 0 {
		return a / b
	} else {
		return a/b + 1
	}
}

// Sort
type RuneSlice []rune

func (a RuneSlice) Len() int           { return len(a) }
func (a RuneSlice) Less(i, j int) bool { return a[i] < a[j] }
func (a RuneSlice) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }

// Main
func main() {
	sc := NewScanner()
	wtr := bufio.NewWriter(os.Stdout)
	N := sc.nextInt()
	dp := make([]int, N+1)
	dp[0] = 1
	dp[1] = 1
	for i := 2; i <= N; i++ {
		dp[i] = dp[i-1] + dp[i-2]
	}

	fmt.Fprintln(wtr, dp[N])
	wtr.Flush()
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) REP(i,0,n)
#define REP(i,s,e) for(int i=(s); i<(int)(e); i++)
#define repr(i, n) REPR(i, n, 0)
#define REPR(i, s, e) for(int i=(int)(s-1); i>=(int)(e); i--)
#define pb push_back
#define all(r) r.begin(),r.end()
#define rall(r) r.rbegin(),r.rend()
#define fi first
#define se second

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const ll INF = 1e18;
const ll MOD = 1e9 + 7;
const double EPS = 1e-8;

template<typename T> T chmax(T& a, const T& b){return a = (a > b ? a : b);}
template<typename T> T chmin(T& a, const T& b){return a = (a < b ? a : b);}

#define DEBUG_MODE
#ifdef DEBUG_MODE
#define dump(x) cout << #x << " : " << x << " "
#define dumpL(x) cout << #x << " : " << x << '\n'
#define LINE cout << "line : " << __LINE__ << " "
#define LINEL cout << "line : " << __LINE__ << '\n'
#define dumpV(v) cout << #v << " : ["; for(auto& t : v) cout << t << ", "; cout<<"]" << " "
#define dumpVL(v) cout << #v << " : ["; for(auto& t : v) cout << t << ", "; cout<<"]" << endl
#define STOP assert(false)
#else
#define dump(x) 
#define dumpL(x) 
#define LINE 
#define LINEL 
#define dumpV(v) 
#define dumpVL(v) 
#define STOP assert(false)
#endif
#define mp make_pair
 
namespace std {
template<class S, class T>
ostream &operator <<(ostream& out, const pair<S, T>& a) {
    out << '(' << a.fi << ", " << a.se << ')';
    return out;
}
}

template <class T, int SZ>
struct Mat {
    array<array<T, SZ>, SZ> d;
    const int n;
    Mat() : n(SZ) {
        array<T, SZ> tmp;
        d.fill(tmp);
    }
    Mat operator * (const Mat& mt) const {
        Mat ret;
        rep(i, SZ) rep(j, SZ) {
            rep(k, SZ) {
                ret.d[i][j] += (d[i][k] * mt.d[k][j]);
            }
        }
        return ret;
    }
    Mat& operator *= (const Mat& mt) {
        *this = *this * mt;
        return *this;
    }
    Mat& operator = (const Mat& mt) {
        d = mt.d;
        return *this;
    }
    array<T, SZ>& operator [](const int n) {
        return d[n];
    }
};

template <class T, int SZ> 
Mat<T, SZ> pow(Mat<T, SZ> mt, ll n) {
    Mat<T, SZ> ret;
    rep(i, SZ) ret.d[i][i] = 1LL;
    while(n > 0) {
        if(n&1LL) ret = ret * mt;
        mt = mt*mt;
        n >>= 1;
    }
    return ret;
}

template <typename T, typename U> T pow_fast(T x, U n) {
    T ret = (T)1;
    while(n) {
        if(n & (U)1) ret *= x;
        x *= x;
        n >>= 1;
    }
    return ret;
}

template <typename ModType, ModType MOD> struct ModInt {
    ModType val;
    ModInt() : val(0) {}
    ModInt(ModType x) : val(x % MOD) {
        if(val < 0) val += MOD;
    };
    operator ModType() const { return val; }
    ModInt &operator+=(const ModInt &m) {
        val += m.val;
        if(val >= MOD) val -= MOD;
        return *this;
    }
    ModInt &operator-=(const ModInt &m) {
        val -= m.val;
        if(val < 0) val += MOD;
        return *this;
    }
    ModInt &operator*=(const ModInt &m) {
        (val *= m.val) %= MOD;
        return *this;
    }
    ModInt &operator/=(const ModInt &m) {
        *this *= m.inverse();
        return *this;
    }
    ModInt operator+(const ModInt &m) const { return ModInt(*this) += m; }
    ModInt operator-(const ModInt &m) const { return ModInt(*this) -= m; }
    ModInt operator*(const ModInt &m) const { return ModInt(*this) *= m; }
    ModInt operator/(const ModInt &m) const { return ModInt(*this) /= m; }
    ModInt inverse() const { return pow_fast(*this, MOD - 2); }
    ModInt pow(ModType n) const {return pow_fast(*this, n); }

    friend std::ostream &operator<<(std::ostream &os, const ModInt &rhs) {
        os << rhs.val;
        return os;
    }
    friend std::istream &operator>>(std::istream &is, ModInt &rhs) {
        ModType value;
        is >> value;
        rhs = ModInt(value);
        return is;
    }
};

int main(){
    // using mint = ModInt<ll, MOD>;
    Mat<ll, 2> mt;
    mt[0][0] = mt[0][1] = mt[1][0] = 1;
    int n;
    cin >> n;
    cout << pow(mt, n+1)[1][0] << endl;
    return 0;
}

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

int main() {

    int n;
    cin >> n;

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

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

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

int S[50];
int fib(int N){
    if(N==0||N==1) return S[N]=1;
    if(S[N]!=0) return S[N];
    return S[N]=fib(N-1)+fib(N-2);
}

int main(){

    int N;
    cin>>N;
    cout<<fib(N)<<endl;
}

C++: import numpy as np
import sys

def fib(n):
    if (n == 0):
        return 1
    elif (n == 1):
        return 1
    else :
        return fib(n - 1) + fib(n - 2)

if __name__ == "__main__":
    n = input("input number: ")
    n = int(n)
    #print(type(n))
    print(fib(n))

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

using namespace std;

int main()
{
    int fibo[44], n, i;
    
    cin >> n;
    
    fibo[0] = 1;
    fibo[1] = 1;
    
    i = 0;
    while (i <= n) {
        if (i > 1) fibo[i] = fibo[i-2] + fibo[i-1];
        i++;
    }
    
    cout << fibo[n] << endl;
    
    return 0;
}

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

int main(){
  cin >> n;
  int dp[n+1];
  // 初期化
  for (int i = 0; i <= n; i++){dp[i] = 0;}
  for ( int i = 0; i <= n; i++){
    if ( i <= 1 ){dp[i] = 1;}
    else {
      dp[i] = dp[i-1] + dp[i-2];
    }
  }

  cout << dp[n] << endl;

  return 0;
}

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

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