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;

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

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 fib(int n){
  if (n <= 1) return (1);
  else  return (fib(n - 1) + fib (n - 2));
}

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

  cout << fib(n) << endl;
  return (0);
}

C++: #include<iostream>

using namespace std;

int main(){
  int n;cin >> n;
  long long a=1, b=1, c;
  for(int i=0;i<n-1;i++){
    c = b;
    b = a;
    a = b + c;
  }
  cout << a << endl;
}

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

using ll = long long;

vector<ll> F(45, 0);
long fibDP(int n) {
	if(n <= 1) return F[n] = 1;
	if(F[n] != 0) return F[n];
	return F[n] = fibDP(n-1) + fibDP(n-2);
}

int main() {
	int n; cin >> n;
	cout << fibDP(n) << endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

const int N = 45;
int fib[N];

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

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

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

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

int main(){
    int n;
    cin >> n;
    int a1 = 1, a2 = 1, temp;
    for(int i = 1; i < n; i++){
        temp = a2;
        a2 += a1;
        a1 = temp;
    }
    printf("%d\n", a2);
    return 0;
}

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

int A[2000000],N = 0,dp[45];

int fibonacci(int n) {

  if(dp[n] != 0) return dp[n];

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


int main() {

  int N;
  cin >> N;

  int ans = fibonacci(N);
  cout << ans << endl;

}

C++: #include <iostream>

int Fib[45];

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

  Fib[0]=Fib[1]=1;
  for(int i=2; i<=n; i++){
    Fib[i] = Fib[n-1]+Fib[i-2];
  }
  std::cout << Fib[n] << std::endl;

  return 0;
}

C++: #include <algorithm>
#include <complex>
#include <cstdlib>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

using namespace std;
#define SAY_YES cout << "YES" << endl;
#define SAY_Yes cout << "Yes" << endl;
#define SAY_NO cout << "NO" << endl;
#define SAY_No cout << "No" << endl;
#define IFYES(TRUE_OR_FALSE)   \
    if (TRUE_OR_FALSE)         \
    {                          \
        cout << "YES" << endl; \
    }                          \
    else                       \
    {                          \
        cout << "NO" << endl;  \
    }
#define IFYes(TRUE_OR_FALSE)   \
    if (TRUE_OR_FALSE)         \
    {                          \
        cout << "Yes" << endl; \
    }                          \
    else                       \
    {                          \
        cout << "No" << endl;  \
    }
#define IFyes(TRUE_OR_FALSE)   \
    if (TRUE_OR_FALSE)         \
    {                          \
        cout << "yes" << endl; \
    }                          \
    else                       \
    {                          \
        cout << "no" << endl;  \
    }
#define DEBUG_OUTPUT_ARRAY(XXX, ONE)                            \
    for (int i = 0; i < (ONE); i++)                             \
    {                                                           \
        cout << "DEBUG: i = " << i << " -> " << XXX[i] << endl; \
    }
#define DEBUG_OUTPUT_ARRAY2(XXX, ONE, TWO)                             \
    for (int i = 0; i < (ONE); i++)                                    \
    {                                                                  \
        cout << "<<< i = " << i << " >>>" << endl;                     \
        for (int j = 0; j < (TWO); j++)                                \
        {                                                              \
            cout << "DEBUG: j = " << j << " -> " << XXX[i][j] << endl; \
        }                                                              \
    }
#define DEBUG_OUTPUT_ARRAY2_BOX(XXX, ONE, TWO) \
    for (int i = 0; i < (ONE); i++)            \
    {                                          \
        cout << i << "  ";                     \
        for (int j = 0; j < (TWO); j++)        \
        {                                      \
            cout << XXX[i][j] << " ";          \
        }                                      \
        cout << endl;                          \
    }

typedef pair<long long int, long long int> pll;


const long long int mod = 1000000007;
const long long int INF = 99999999999999999;


long long int N,dp[55]={};
int main()
{
    cout << fixed << setprecision(18);
    cin>>N;
    dp[0]=1;
    dp[1]=1;
    for(long long int i = 2; i < 50; i++){
        dp[i]=dp[i-1]+dp[i-2];
    }
    cout<<dp[N]<<endl;
}

C++: #include<stdio.h>

int main(void){
    int i, n, F[45] = {};
    scanf("%d", &n);

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

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

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

    return 0;
}

C++: // input: aldsalds1_10_a.in
#include<iostream>
#define MAX_N 45
#define NIL -1
using namespace std;

int dp[MAX_N];

int fib(int n) {
  if(n == 0 || n == 1)
    return 1;

  if(dp[n] != NIL)
    return dp[n];

  int v = fib(n-1) + fib(n-2);
  dp[n] = v;

  return v;
}

int main() {
  for(int i=0; i<MAX_N; i++)
    dp[i] = NIL;

  int x;
  cin >> x;

  cout << fib(x) << endl;
}