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 <bits/stdc++.h>
//----***やべーやつら***----
using namespace std;
#define int long long

//----***型定義***----
using ll = long long;
using P = pair<int,int>;

//----***Like a Pythonista***----
#define REP(ii,jj,nn) for (ll ii=jj;ii<(nn);ii++)
#define RREP(ii,nn,jj) for (ll ii = nn; jj<ii;ii--)
#define each(i,...) for (auto&& i:__VA_ARGS__)
#define ALL(vec) (vec).begin(),(vec).end()
#define sum(...) accumulate(ALL(__VA_ARGS__),0LL)
#define dsum(...) accumulate(ALL(__VA_ARGS__),0.0)
#define vec(type,name,...) vector<type> name(__VA_ARGS__)
template<class T> inline auto max(const T& a){ return *max_element(ALL(a)); }
template<class T> inline auto min(const T& a){ return *min_element(ALL(a)); }
inline ll gcd(ll a,ll b){if(b == 0) return a;return  gcd(b,a%b);}
inline ll lcm(ll a,ll b){ll g = gcd(a,b);return a / g * b;}

//----***定数***----
#define MOD 1000000007
#define INF 100000000000000000
#define EPS 1e-9
const vector<vector<int>> DXY={{-1,0},{1,0},{0,-1},{0,1}};

//----***パーツ***----
#define fr first
#define se second

//----***入出力***---
#define print(out) cout<< out  << "\n";
#define debug(var)  do{std::cerr << #var << " ↓ "<<"\n";view(var);}while(0);
#define dbg cerr<<"🥺🥺🥺🥺🥺🥺"<<endl;
template<typename T> void view(T e){std::cout << e << std::endl;}
template<typename T> void view(const std::vector<T>& v){for(const auto& e : v){ std::cout << e << " "; } std::cout << std::endl;}
template<typename T> void view(const std::vector<std::vector<T> >& vv){ for(const auto& v : vv){ view(v); } }

//----***初期時読み込み***----
struct initial{initial(){cin.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(15);};}initial_;

vector<int> memo(50,0);

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

}

signed main(){
  int N;cin>>N;
  memo[0]=memo[1]=1;
  int ans =fibo(N);
  print(ans)



}

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

int dp[45];

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

    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;
#define MAX 45

int fib[45];
void make_fib(){
	fib[0] = 1;
	fib[1] = 1;
	for (int i=2;i<MAX;i++) {
	fib[i] = fib[i-1] + fib[i-2];
	}
}

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

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


void fibonacci(int n){
  vector<int> fib;

  fib.push_back(1);
  fib.push_back(1);

  for(int i = 2;i < n;i++){
    fib.push_back(fib.at(i - 2) + fib.at(i - 1));
  }

  cout << fib.at(n - 1) << endl;

}

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

  return 0;
}

C++: #include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <queue>
#include <string>
#include <numeric>
#include <vector>

using namespace std;

int memo[45] = {0};

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


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

  return 0;
}

C++: #include<bits/stdc++.h>
#define INF 1e9
using namespace std;
int num[50];
int fib(int n){
    if(n==0 || n==1) return 1;
    else if(num[n]!=INF) return num[n];
    else return fib(n-1) + fib(n-2);
}
int main(){
    for(int i=0;i<50;i++) num[i]=INF;
    for(int i=0;i<45;i++){
        num[i]=fib(i);
    }
    int n;
    cin>>n;
    cout<<num[n]<<endl;
    return 0;
}

C++: #include <cstdio>

int main() {
	int n;
	int F[50];
	scanf("%d", &n);

	F[0] = 1;
	F[1] = 1;

	for (int i = 2; i <= n; i++) F[i] = F[i - 1] + F[i - 2];

	printf("%d\n", F[n]);
	return 0;
}

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

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

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 memo[n] = fib(n-1) + fib(n-2);
}

C++: #include <iostream>

using namespace std;

int A[128];
int fib(int n){
  A[0] =1;
  for(int i=1;i<44;++i){
    A[i] =A[i-1];
    if(i>1)A[i]+=A[i-2];
  }
  return A[n-1];

}

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

C++: #include <iostream>

using namespace std;
int n;
int a[50];

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

C++: #include <iostream>
#include <stdio.h>
#include <fstream>
#include <algorithm>
#include <string>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <limits.h>
#include <math.h>
#define rep(i,n) for (int i = 0; (i) < (n); ++ (i))
using namespace std;

int fib(unsigned int n);

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

int fib(unsigned int n) {
    vector<int> ary(n+1);
    ary[0] = 1;
    ary[1] = 1;
    for(int i = 2; i <= n; ++i) ary[i] = ary[i-1] + ary[i-2];
    return ary[n];
}

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

int main()
{
    int n;
    cin >> n;
    vector<int> fib(n + 1, -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>
#include <cmath>
#include <algorithm>
#include <vector>
#include <numeric>
#include <queue>
#include <map> 
#include <set>
#include <string>
#include <functional>
using namespace std;
long long mem[50] = {0};
long long fib(int n){
	if (mem[n] != 0) return mem[n];
	if (n == 0 || n == 1){
		mem[n] = 1;
		return 1;
	}
	else{
		mem[n] = fib(n - 1) + fib(n - 2);
		return fib(n - 1) + fib(n - 2);
	}
}
int main(){
	int n;
	cin >> n;
	cout << fib(n) << "\n";
	return 0;
}