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 <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;
}