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 <iostream>
#include <algorithm> // next_permutation
#include <iomanip>
#include <cmath>
#include <vector>
#include <sstream>
#include <string>
#include <cstdio>
#include <stack>
#include <queue>
#include <list>
#include <numeric> //accumulate
//#include <unordered_map> //???????????\??¢??°
#include <fstream> //ifstream, ofstream

//#define NDEBUG //NDEBUG???#include <cassert>???????????????????????????????????´???assert?????????????????????????????????NDEBUG?????????????????????????????????????????????
#include <cassert> //assert


using namespace std;

//???????????°??????TEST????????????????????¬???????????????????????????????????¢????????????
#define TEST //*******************************************************************************************************************************************
//?????????????????¨??§?????\????????????????????????????????°?????????????¨???????????????????dout???????????????????????§???????????¬??????????????????????????????????????????
//??????????????????????????????????????????????????????????§?CPU???????£??????????????????§???TLE?????????????????????????????????????????§????????¨???                           ????????????????????????cerr????????£????????????????????????????????????
#ifdef TEST
#define dout cout
#define din cin
#else
stringstream dummy; //???????????°??????dout?????????????????????????????????
#define dout dummy.str(""); dummy.clear(stringstream::goodbit); dummy //dummy?????????????????????????????????????????¨?????¢?????¢???????????????
//???????????¨??????????????????goodbit?????????????????????????????¨???????????´????????????????????????????????¨?????°?????????????????§???????????????????????????????????? http://d.hatena.ne.jp/linden/20060427/p1
#endif

//?¨??????????????????????????????????????????????????????´??????OUTPUTFILE????????????????????¬???????????????????????????????????¢????????????
//#define OUTPUTFILE "output.txt" //*******************************************************************************************************************************************
#ifdef OUTPUTFILE
#define dout outputfile //??¨????????????TLE????????§?????????dout?????¨??¨??????????????¢????????????????????????????????????????????§????¨????????????´??????????????£??????????????????????¨?????????????????????????????????????????????§?????????????????????
ofstream outputfile(OUTPUTFILE);
#define OutputFilePath "/Users/Nag/Documents/Prgm/Test/DerivedData/Test/Build/Products/Debug/output.txt"
#endif

//?¨??????\???????????????????????????????????????????????´??????INPUTFROMTEXTFILE????????????????????¬???????????????????????????????????¢????????????
//#define INPUTFILE "input.txt" //*******************************************************************************************************************************************
#ifdef INPUTFILE
#define din inputfile
ifstream inputfile(INPUTFILE);
#endif


#define disp(A) dout << #A << " = " << (A) << endl
#define disP(A) dout << setw(3) << (A) << " " // << setw(3) ??????????????\????????????
#define rep(i,a,n) for(int (i)=(a); (i)<(n); (i)++)

#define dispAll(A,n) dout << #A << " = "; rep(j, 0, (n)) {disP(A[j]);} dout << endl

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

const int INF = 1e9-1;

int fibonacci(int n) {
    
    if(n==0 || n==1) return 1;
    
    return fibonacci(n-1) + fibonacci(n-2);
}


int main() {
    int n; cin >> n;
    
    dout << fibonacci(n) << endl;
    
    
    
#ifdef INPUTFILE
    inputfile.close();
#endif
    
#ifdef OUTPUTFILE
    outputfile.close();
    cout << "\"" << OutputFilePath << "\"" << endl;
#endif
    
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int n;
	cin >> n;
	int a = 1;
	int b = 1;
	for(int i=1; i<n;++i){
		int t = b;
		b = a + b;
		a = t;
	}
	cout << b << std::endl;
}

C++: #include <iostream>

using namespace std;

int main(){
	int n;
	cin>>n;

	int fib[100]={0};

	fib[0]=1;
	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 <iostream>
#include <unordered_map>
using namespace std;

unordered_map<int,int> memo;
int fib(int n){
    if(n<2) return 1;
    if (not memo.count(n)) memo[n] = fib(n-1)+fib(n-2);
    return memo[n];

}

int main(void){cin.tie(0);ios::sync_with_stdio(false);
    int n; cin>>n;
    cout<<fib(n)<<"\n";
}

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

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

C++: #include "iostream"
#include "algorithm"
#include "string"
using namespace std;

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

C++: #include <stdio.h>
#define MAX 45

int F[MAX];

int fibonacci(int n){
  if(F[n] != -1) return F[n];
  if(n == 0 || n == 1){
    F[n] = 1;
  }else{
    F[n] = fibonacci(n-1) + fibonacci(n-2);
 }
  return F[n];
}

int main(void){
  int n, f;
  scanf("%d", &n);
  for(int i=0; i<=n; i++){
    F[i] = -1;
  }
  f = fibonacci(n);
  printf("%d\n", f);
  return 0;
}

C++: #include <cstdio>

int fib(int *a,int n){
    if(n==0 || n==1)return 1;
    else{
        int tmp;
        if(a[n])tmp = a[n];
        else{
            tmp = fib(a,n-1) + fib(a,n-2);
            a[n] = tmp;
        }
        return tmp;
    }
}

int main(){
    int i, n;
    int a[45];
    for(i=0;i<45;i++)a[i]=0;
    scanf("%d",&n);
    printf("%d\n",fib(a,n));
    return 0;
}

C++: #include<iostream>

using namespace std;

int fib(int n);

int memo[45];

int main() {
  int n;

  //入力
  cin >> n;

  //出力
  cout << fib(n) << endl;

  return 0;
}

int fib(int n){

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