Go: package main

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

var (
	nstr   func() string
	stdout *bufio.Writer
)

func init() {
	nstr = newReadString(os.Stdin)
	stdout = bufio.NewWriter(os.Stdout)
}

func main() {
	defer stdout.Flush()
	n := nint()
	r := fibonacci(n)
	fmt.Println(r)
}

func fibonacci(n int) int{
	if n == 0 || n == 1{
		return 1
	}else{
		fiList := make([]int, n+1)
		fiList[0] = 1
		fiList[1] = 1
		for i:=2; i<n+1; i++{
			fiList[i] = fiList[i-1] + fiList[i-2]
		}
		return fiList[n]

	}

}

func newReadString(ior io.Reader) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+11))
	r.Split(bufio.ScanWords)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

func nint64() int64 {
	i, err := strconv.ParseInt(nstr(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

func nint() int {
	return int(nint64())
}

func getIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = nint()
	}
	return b
}

func getStringSlice(n int) []string {
	b := make([]string, n)
	for i := 0; i < n; i++ {
		b[i] = nstr()
	}
	return b
}

func gcd(x, y int) int {
	if y == 0 {
		return x
	}
	return gcd(y, x%y)
}

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

func contains(s []int, e int) bool {
	for _, a := range s {
		if a == e {
			return true
		}
	}
	return false
}

func bin(i int, prefix bool) string {
	i64 := int64(i)

	if prefix {
		return "0b" + strconv.FormatInt(i64, 2)
	} else {
		return strconv.FormatInt(i64, 2)
	}
}

func strReverse(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}

	return string(runes)
}

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

typedef long long int lli;

lli nlist[50];

int main(){
  int N;
  nlist[0]=nlist[1]=1;
  for(int i=2;i<50;i++) nlist[i]=nlist[i-1]+nlist[i-2];
  cin>>N;
  cout<<nlist[N]<<endl;
  return 0;
}

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

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

  int F[45];
  F[0] = F[1] = 1;

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

  cout << F[N] << endl;

  return 0;
}

C++: #include <vector>
#include <iostream>
using namespace std;
typedef vector<int> vec;
typedef vector<vec> mat;
typedef long long ll;
//A*Bの計算
mat mul(mat &A,mat &B){
	mat C(A.size(),vec(B[0].size()));
	for(int i =0;i <A.size();i++){
		for(int k =0;k <B.size();k++){
			for(int j =0;j <B[0].size();j++){
				C[i][j] =(C[i][j]+A[i][k]*B[k][j]);
			}
		}
	}
	return C;
}

//A^nの計算
mat pow(mat A,ll n){
	mat B(A.size(),vec(A.size()));
	for(int i =0;i <A.size();i++){
		B[i][i]=1;
	}
	while(n >0){
		if(n&1)B =mul(B,A);
		A =mul(A,A);
		n >>=1;
	}
	return B;
}


int main(){
	int n;
	cin>>n;
	mat A(2,vec(2));
	A[0][0]=1;
	A[0][1]=1;
	A[1][0]=1;
	A[1][1]=0;
	A =pow(A,n+1);
	cout <<A[1][0]<<endl;
	return 0;
}

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

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

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

int dp[50];

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

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

C++: #include <cstdio>

const int MAX = 45;

int fib_num[MAX];

int fib(int n)
{
  if (fib_num[n] != 1)
    return fib_num[n];

  if (n == 0 || n == 1)
    return 1;
  else
    return fib_num[n] = fib(n - 1) + fib(n - 2);
}

int main()
{
  for (int i = 0; i < MAX; ++i)
    fib_num[i] = 1;

  int n;
  scanf("%d", &n);
  printf("%d\n", fib(n));

  return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef vector<ld> vd;
typedef vector<ll> vll;
typedef vector<string> vstr;
typedef vector<vector<ll>> vvll;
typedef vector<pair<ll, ll>> vpll;
typedef priority_queue<ll, vector<ll>, greater<ll>> spqll;  // 小さい順に取り出し
typedef priority_queue<ll, vector<ll>, less<ll>> bpqll;     // 大きい順に取り出し

#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define FOR(i, a, b) for (ll i = (ll)a; i < (ll)b; i++)
#define IREP(i, v) for (auto i = (v).begin(); i != (v).end(); i++)
#define FI first
#define SE second
#define MP make_pair
#define MT make_tuple
#define PB push_back
#define TS to_string
#define NP next_permutation
#define ALL(v) (v).begin(), (v).end()
#define SZ(x) (ll) x.size()
#define SP(x) setprecision((ll)x)


ll INF = 1e9;
ll NIL = -1;
ll MOD = 1000000007;
ll LINF = 1e18;
ld EPS = 1e-9;
ld PI = M_PI;
vll dx = {1, 0, -1, 0, 1, -1, -1, 1};
vll dy = {0, 1, 0, -1, 1, 1, -1, -1};
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a;} //最大公約数
ll lcm(ll a, ll b) { return a / gcd(a, b) * b;}     //最小公倍数

void yes(){ cout << "yes" << endl;}
void no(){ cout << "no" << endl;}

//-----------------------------------------

//-----------------------------------------
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  int n;
  cin >> n;
  vll fib(100);
  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<bits/stdc++.h>
using namespace std;

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