Go: package main

/*
フィボナッチ数列
*/

import (
	"bufio"
	"bytes"
	"fmt"
	"log"
	"os"
	"strconv"
	"strings"
)

func fibWithMemo(n int, memo map[int]int) int {
	if n == 0 || n == 1 {
		return 1
	}
	if val, ok := memo[n]; ok {
		return val
	}
	memo[n] = fibWithMemo(n-1, memo) + fibWithMemo(n-2, memo)
	return memo[n]
}

func fib(n int) int {
	memo := make(map[int]int)
	return fibWithMemo(n, memo)
}

func main() {
	scanner := makeScanner(1024)
	n := eGetInt(scanner)
	fmt.Println(fib(n))
}

////////////////////////////////////////////////////////////////////////////////
// ライブラリ
////////////////////////////////////////////////////////////////////////////////
func makeScanner(maxByte int) *bufio.Scanner {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Buffer(make([]uint8, 0, 8192), maxByte)
	return scanner
}
func makeWordScanner() *bufio.Scanner {
	scanner := makeScanner(8192)
	scanner.Split(bufio.ScanWords)
	return scanner
}
func eGetLine(r *bufio.Scanner) string {
	if r.Scan() {
		return r.Text()
	}
	err := r.Err()
	if err != nil {
		log.Fatal(err)
	}
	// EOF
	return ""
}
func eGetInt(r *bufio.Scanner) int {
	line := eGetLine(r)
	return eAtoi(line)
}
func eGetFields(r *bufio.Scanner) []string {
	line := eGetLine(r)
	return strings.Fields(line)
}
func eGetInts(r *bufio.Scanner) []int {
	fields := eGetFields(r)
	ints := make([]int, len(fields))
	for i := 0; i < len(ints); i++ {
		ints[i] = eAtoi(fields[i])
	}
	return ints
}
func eGetChars(r *bufio.Scanner) []string {
	line := eGetLine(r)
	return strings.Split(line, "")
}
func eAtoi(s string) int {
	n, err := strconv.Atoi(s)
	if err != nil {
		log.Fatal(err)
	}
	return n
}

type ints []int

func (s ints) String() string {
	var buf bytes.Buffer
	buf.WriteString("[")
	sep := ""
	for _, v := range s {
		buf.WriteString(fmt.Sprintf("%s%d", sep, v))
		sep = ", "
	}
	buf.WriteString("]")
	return buf.String()
}

func reverse(a ints) ints {
	r := make(ints, len(a))
	for i := 0; i < len(a); i++ {
		r[i] = a[len(a)-1-i]
	}
	return r
}
func max(a ints) (int, bool) {
	if len(a) == 0 {
		return 0, false
	}
	m := a[0]
	for _, e := range a {
		if e > m {
			m = e
		}
	}
	return m, true
}
func min(a []int) int {
	m := a[0]
	for _, v := range a {
		if v < m {
			m = v
		}
	}
	return m
}

func sum(a ints) int {
	if len(a) == 0 {
		return 0
	}
	sum := 0
	for _, e := range a {
		sum += e
	}
	return sum
}
func find(n int, a ints) int {
	for i, v := range a {
		if n == v {
			return i
		}
	}
	return -1
}

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

#define debug(x) cout <<"DEBUG"<<" "<< #x << ":" << x << '\n'

// n回繰り返し
#define rep(i,n) for(int i = 0; i < ((int)(n)); i++)   // 0-indexed昇順
#define rep1(i,n) for(int i = 1; i <= ((int)(n)); i++) // 1-indexed昇順
#define rrep(i,n) for(int i = ((int)(n)-1); i >= 0; i--)  // 0-indexed降順
#define rrep1(i,n) for(int i = ((int)(n)); i >= 1; i--)   // 1-indexed降順
#define all(x) (x).begin(),(x).end()

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vi> vii;  // 2次元配列
typedef vector<ll> vll;
typedef vector<double> vd;
typedef pair<int, int> PII;

template<typename T>
using vec = vector<T>;
template<class T>
using maxheap = std::priority_queue<T>;
template<class T>
using minheap = std::priority_queue<T, std::vector<T>, std::greater<T>>;

template<class T,class U> inline bool chmax(T &a, const U &b){if(a<b){a=b;return 1;}return 0;}
template<class T,class U> inline bool chmin(T &a, const U &b){if(a>b){a=b;return 1;}return 0;}

const ld Pi = std::acos(-1.0L);
const ll infll = (1LL<<62)-1;
const int inf = (1<<30)-1;
const int mod = 1000000007;
// const int mod = 998244353;


/*FUNCs=================================================*/


/*MAIN==================================================*/
signed main(){
    int _StartTime_ = clock();
    cin.tie(nullptr);
    ios::sync_with_stdio(false);   //cin cout 高速化
    // cout << fixed << setprecision(15);

    int n; cin >> n;
    vll fib(n+1);
    fib[0] = fib[1] = 1;
    for(int i = 2; i <= n; ++i) {
        fib[i] = fib[i-1] + fib[i-2];
    }
    cout << fib[n] << '\n';
    // printf("ExcutionTime: %d /ms\n",1000*(int)((clock()-_StartTime_)/CLOCKS_PER_SEC));
}

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

int main()
{
    int n;
    cin >> n;
    long fib[3] = {1, 0, 0};
    for (int i = 0; i <= n; ++i) {
        fib[2] = fib[1] + fib[0];
        fib[0] = fib[1];
        fib[1] = fib[2];
    }
    cout << fib[2] << endl;
    return 0;
}

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

int main() {
  int x, y;
  int F[50];
  F[0] = F[1] = 1;
  for ( i = 2; i < 50; i++ ) F[i] = F[i-1] + F[i-2];

  cin >> x;
  cout << F[x] << endl;

  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int F[114]={};
int fib(int n){
    if(n == 0 || n == 1) return F[n] = 1;
    else if(F[n] != 0) return F[n];
    else {
        return F[n] = fib(n-1) + fib(n-2);
    }
}

int main() {
    ios::sync_with_stdio(false);
    int n;
    cin >>n;
    fib(n);
    cout << F[n] << endl;
    return 0;
}

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

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

  return 0;
}

C++: #include <iostream>

using namespace std;


int F[45];

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

  int input;
  cin >> input;
  cout << F[input]<< endl;
}

C++: #include<stdio.h>
#define N 100

int F[N];

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

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

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

int main()
{

	int n;
	cin >> n;

	vector<int64_t> fib(n+1);
	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;
}

C++: #include<iostream>
using namespace std;
int fib(int n)
{
    int F[50];
    if(n<=1) return 1;
    for(i = 2 ; i < =n; i++)
    {
        F[i] = F[i-1] + F[i-2];
    }
    return F[n];
}

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

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

int n, A[44];

void fibo(){
    A[0] = 1;
    A[1] = 1;
    for (int i = 2; i <= n; i++) A[i] = A[i -1] + A[i -2];
}

int main(){
    cin >> n;
    fibo();
    cout << A[n] << endl;
    return 0;
}

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

int main()
{
    int N;
    cin >> N;
    vector<ll> ans(45, 1);
    ans[0] = 1;
    ans[1] = 1;
    for (int i = 2; i <= N; i++)
    {
        ans[i] = ans[i - 2] + ans[i - 1];
    }
    cout << ans[N] << endl;

    return 0;
}

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

#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1e9
typedef long long ll;


int n;
vector<int> dp;
int main() {
    cin >> n;
    dp.assign(n+1,-1);
    dp[0] = 1;
    dp[1] = 1;
    FOR(i,2,n+1){//i=nまで計算！
        dp[i] = dp[i-1] + dp[i-2];
    }

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