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;

const int MAX = 44;
int F[MAX];

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


int main() {
    ios::sync_with_stdio(false);

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

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

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

int F[50];

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

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

int n, arr[100000];

int solve(int n) {
	arr[0]=arr[1]=1;
	for (int i = 2; i <= n; i++) arr[i] = arr[i-2]+arr[i-1];
	return arr[n];
}

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

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

int dp[44];

int fib(int n) {
	if (dp[n] != -1)return dp[n];
	int res;

	if (n == 0 || n == 1) {
		res = 1;
	}
	else {
		res = fib(n - 1) + fib(n - 2);
	}

	dp[n] = res;
	return res;
}

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

	return 0;
}

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

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

C++: //#define _GLIBCXX_DEBUG

#include<bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int INF= 1e9+5;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>>vvi;
const ll MOD=1000000007LL;
int main(){
  int n;
  cin>>n;
  int fib[100];
  fib[0]=1;
  fib[1]=1;
  for(int i=2;i<50;i++){
    fib[i]=fib[i-1]+fib[i-2];
  }
  cout<<fib[n]<<endl;
}

C++: #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
typedef long long int ll;
typedef long double ld;
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define Sort(Array) sort(Array.begin(), Array.end())
#define Reverse(a) reverse(a.begin(), a.end())
#define out(ans) cout << ans << endl;
const int MOD = 1000000007;
const int INF = 2147483647;

//------------↓------------- M -------------- E ---------------- M --------------- O ---------------↓--------------//
// コンパイル 
// g++ -std=c++1z
//
// -------型変換--------
// int を string に変換
// string s = to_string(n);
// string を int に変換
// int n = stoi(s);
//
// -------二分探索---------
// k以上の値が最初に現れる時のイテレータ O(logN)
// lower_bound(data.begin(), data.end(), k)
// kより大きい値が最初の現れる時のイテレータ O(logN)
// upper_bound(data.begin(), data.end(), k)
// kがdataに存在するかをtrue or falseで返す O(logN)
// binary_search(data.begin(), data.end(), k)
// 
//
//
//
//
//
// 
//------------↑------------- M -------------- E ---------------- M --------------- O ---------------↑--------------//


int main() {

    int n; cin >> n;

    ll dp[45];
    dp[0] = dp[1] = 1;
    for (int i = 2; i <= 44; ++i) dp[i] = dp[i-1] + dp[i-2];
    out(dp[n]);

    return 0;
}

C++: #inclue<stdio>
#include<stream>
using namespace std;

int fibo(int x) {
  int a;
  if ( x == 0 ) return 1;
  if ( x == 1 ) return 1;
  a = fibo(x-1) + fibo(x-2);
  return a;
}

int main() {
  int x, y;

  cin >> x;

  y = fibo(x);

  cout << y << endl;

  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
main(){
  int a[44],n;
  a[0]=a[1]=1;
  cin>>n;
  for(int i=2;i<=n;i++)a[i]=a[i-1]+a[i-2];
  cout<<a[n]<<endl; 
}

C++: // ALDS1_10_A Fibonacci Number
#include <iostream>
#include <vector>
bool debug = false;

std::vector<int> dp_array;

int main() {
    int target; std::cin >> target;

    dp_array.push_back(1); // i == 0
    dp_array.push_back(1); // i == 1
    for (int i=2; i<=target; i++) {
        dp_array.push_back(dp_array.at(i-1)+dp_array.at(i-2));
    }

    std::cout << dp_array.back() << "\n";
}

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

int main()
{
	int n;
	std::cin >> n;
	std::vector<int> dp(n + 1, 0);
	dp[1] = 1;
	dp[0] = 1;
	for (int i = 2; i < n + 1; i++)
	{
		dp[i] = dp[i - 1] + dp[i - 2];
	}
	std::cout << dp[n] << '\n';
	return 0;
}

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

#define MAX 50
#define NIL -1

int F[MAX];

int fib(int n){
    if(n == 0 || n == 1){
       return F[n] = 1;
    }
    if(F[n] != NIL){
        return F[n];
    }

    return F[n] = fib(n-1) + fib(n-2);
}

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

    rep(i,MAX) F[i] = NIL;

    cout << fib(n) << endl;

    return 0;
}

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

int main() {
    int N;
    scanf("%d", &N);
    
    int F[44];
    F[0] = 1; F[1] = 1;
    
    for (int i = 2; i <= N; i++) {
        F[i] = F[i - 2] + F[i - 1];
    }
    
    printf("%d\n", F[N]);

    return 0;
}

C++: #include <bits/stdc++.h>
typedef long long ll;
#define ALL(l)  (l).begin(),(l).end()
#define rep(i,n) for(ll (i)=0;(i)<(n);(i)++)
#define rep2(i, s, n) for (ll i = (s); i < (ll)(n); i++)
using namespace std;

//const ll mod =  1000000007;
//const ll maxn = 1000000000;

//---------------------------------------------------------------------------------------------------
using vi = vector<int>; // intの1次元の型に vi という別名をつける
using vll = vector<ll>; // intの1次元の型に vi という別名をつける
using vvll = vector<vll>; // intの2次元の型に vvi という別名をつける
using vs = vector<string>; // stringの1次元の型に vs という別名をつける
using pll = pair<ll, ll>; // これ以降 pii という型名はpair<ll, ll> と同じ意味で使える
//---------------------------------------------------------------------------------------------------


int main() {
   ll n;
   cin>>n;
   vll a(n+1);
   a.at(0)=1;
   a.at(1)=1;
   rep(i,n-1){
       a.at(i+2)=a.at(i+1)+a.at(i);
   }
   cout<<a.at(n)<<endl;
}

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

int main(){
	int n;
	cin >> n;
	if (n < 2) {
		cout << 1 << endl;
	} else {
		int f[n+1];
		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;
}