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<bits/stdc++.h>
using namespace std;
typedef  long long ll;
using vll=vector<ll>;
using vi=vector<int>;
using vb=vector<bool>;
using pii=pair<int,int>;

template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}return false;}
template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;}

//pow(llpow,modpow)
template<class T> ll llpow(ll x,T n){ll ans=1;if(x==0)ans=0;while(n){if(n&1)ans*=x;x*=x;n>>=1;}return ans;}
long long modpow(long long a, long long n, long long mod) {long long res = 1;while (n > 0) {if (n & 1) res = res * a % mod;a = a * a % mod;n >>= 1;}return res;}
//最大公約数
template<class T> inline T gcd(T x,T y){if(y==0)return x; else {return gcd(y,x%y);}}
//最小公倍数
template<class T> inline T lcm(T x,T y){return x/gcd(x,y)*y;}
//逆元
long long modinv(long long a, long long m) {long long b = m, u = 1, v = 0;while (b) {long long t = a / b;a -= t * b; swap(a, b);u -= t * v; swap(u, v);}u %= m;if (u < 0) u += m;return u;}

#define rep(i, begin_i, end_i) for (ll i = (ll)begin_i; i < (ll)end_i; i++)

long long INF = 1LL<<60;


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

C++: #include<bits/stdc++.h>
using namespace std;
int F[45];
int f(int n){
	if(n==1||n==0)	return F[n]=1;
	if(F[n])	return F[n];
	else return F[n]=f(n-1)+f(n-2);
}
int main(){
	int n;
	cin>>n;
	cout<<f(n)<<endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define int lint
typedef long long lint;
typedef pair<int,int> P;
const int    INF=(int)1e9;
const int    MOD=(int)1e9+7;
const double EPS=(double)1e-10;
struct Accelerate_Cin{
    Accelerate_Cin(){
        cin.tie(0); ios::sync_with_stdio(0);cout<<fixed<<setprecision(20);
    };
};



signed main(){
  int n;cin>>n;
  int dp[100];

  dp[0]=dp[1]=1;
  for(int t=2;t<=n;t++){
    dp[t]=dp[t-1]+dp[t-2];
  }

  cout<<dp[n]<<"\n";
  return 0;
}

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

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

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

#define vec                vector<int>
#define vecll              vector<ll>
#define vecd               vector<double>
#define vecst              vector<string>
#define vecb               vector<bool>
#define vec2(var, n, m)    vector<vector<int>> var(n, vector<int>(m, 0))
#define vecll2(var, n, m)  vector<vector<ll>> var(n, vector<ll>(m, 0))

#define rep(i,n)         for(ll i=(ll)0; i<(ll)n; i++)
#define REP(i,m,n)       for(ll i=(ll)m; i<(ll)n; i++)
#define arr(var, n)      vec var(n); rep(i,n){cin >> var[i];}
#define arrll(var, n)    vecll var(n); rep(i,n){cin >> var[i];}
#define arrst(var, n)    vecst var(n); rep(i,n){cin >> var[i];}
#define all(var)         (var).begin(), (var).end()
#define sortall(var)     sort(all(var))
#define uniqueall(v)     v.erase(unique(v.begin(), v.end()), v.end());
#define f_sum(var)       accumulate(all(var), 0)
#define f_sumll(var)     accumulate(all(var), 0LL)
#define chmin(v1, v2)    v1 = min(v1, v2)
#define chmax(v1, v2)    v1 = max(v1, v2)
#define pb(var)          push_back(var)
#define prt(var)         cout << (var) << "\n"
#define prtd(n, var)     cout << fixed << setprecision(n) << (var) << "\n"
#define prtfill(n, var)  cout << setw(n) << setfill('0') << (var);
#define prt2(v1, v2)     cout << (v1) << " " << (v2) << "\n"
#define prt3(v1, v2, v3) cout << (v1) << " " << (v2) << " " << (v3) << "\n"
#define prtall(v)        rep(i,v.size()){cout<<v[i]<<(i!=v.size()-1?" ":"\n");}
void prtok(bool ok){prt(ok ? "Yes" : "No");}
//----------------------------------------------------------------

int main(void) {
  int n;
  cin >> n;
  int dp[50];
  dp[0]=1;
  dp[1]=1;
  rep(i,47){
    dp[i+2]=dp[i+1]+dp[i];
  }
  prt(dp[n]);
}

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

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

    int fib[n+1];
    rep(i, n+1) fib[i] = 0;

    fib[0] = fib[1] = 1;
    rep(i, n+1)
    {
        if(i >= 2) fib[i] += fib[i-1] + fib[i-2];
    }
    
    cout << fib[n] << endl;
    return 0;
}

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

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

C++: #include <cstdio>
#include <iostream>
#include <algorithm>
#define rep(i,n) for(int i=0; i<(n); ++i)
#define outl(x) cout<< (x) << '\n'
using namespace std;

int fib[45] = {1, 1};

signed main()
{
   cin.tie(0), ios::sync_with_stdio(false);
   int n;
   cin >> n;
   for(int i=2; i<=n; ++i){
      fib[i] = fib[i-1] + fib[i-2];
   }
   outl( fib[n] );
}

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

using namespace std;

typedef long long int lld;

const lld mod = 1e9+7;
const lld INF = 1e9;
//const lld MAXN = 1e9;

int fib[45];

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

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

	return 0;
}

C++: #include<iostream>


/*
auto fib(int x)->int {

	return
		x <= 1 ? 1 : fib(x - 1) + fib(x - 2);
}*/

using ull = unsigned long long;

int main() {

	int n;
	std::cin >> n;
	
	ull tab[45]{};

	auto ans = [](auto f_, auto x) {
		return 
			f_(f_, x);
	}(
		[&](auto f, auto n) ->ull {
		return
			n <= 1 ? 1 :
			tab[n] == 0 ? tab[n] = f(f, n - 1) + f(f, n - 2) : tab[n];

		} ,	n);
	
//	std::cout << fib(3) << "\n";
	std::cout << ans << "\n";

//	std::cin >> ans;

	return 0;
}

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

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

	int n, N[50];
	N[0] = N[1] = 1;
	cin >> n;

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

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