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> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <stdlib.h>
#include <stdio.h>

using namespace std;

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

int abs_A(int num) {
    if (num > 0)
        return num;
    else
        return -num;
}

int abs_B(long long num, long long numb) {
    if (num - numb >= 0)
        return num - numb;
    else
        return -1 * (num - numb);
}

long long gcd(long long a, long long b) {
    if (b == 0) return a;
    else return gcd(b, a % b);
}

long long lcm(long long a, long long b) {
    return a * b / gcd(a, b);
}

bool permutation(vector<int>& vec,vector<int>& P) {
    bool ok = true;
    for (int i = 0; i < vec.size(); i++) {
        //cout << vec.at(i);
        if (vec.at(i) != P.at(i)) {
            ok = false;
        }
    }
    return ok;
}

/*bool nibu(vector<int>& retu,int key) {
    
}*/

const long long MOD = 1000000007;
const int INF = 1001001001;

int main() {
    int N;
    cin >> N;
    vector<int> fib(45);
    fib.at(0) = 1;
    fib.at(1) = 1;
    for (int i = 2; i <= N; i++) {
        fib.at(i) = fib.at(i - 1) + fib.at(i - 2);
    }
    cout << fib.at(N) << endl;
}

C++: #include <iostream>

using namespace std;


int fib(int n){
  if(n<0){
    return 0;
  }
  if(n==1||n==2){
    return 0;
  }
  return fib(n-1)+fib(n-2);

}

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

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

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

    vector<int> dp(n + 1);
    dp[0] = 1; dp[1] = 1;
    for (auto 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;

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++: #icnlude <iostream>

using namespace std;

int fib(int n);

int memo[45];

int main(){
  int n;

  cin >> n;
  cout << fib(n) << endl;
}

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 <bits/stdc++.h>

using namespace std;

int fibo(int n){
    if(n == 0 || n == 1) return 1;
    return fibo(n-1)+fibo(n-2);
}

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

C++: #include<cstdio>

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

C++: #include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <bitset>
#include <climits>
#define REP(i,n) for (int i=0;i<(n);i++)
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define RFOR(i,a,b) for (int i=(a)-1;i>=(b);i--)
#define ll long long
#define ull unsigned long long
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
const int INF = 1e9;
const int MOD = 1e9 + 7;

using namespace std;
int f[50];
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
	int n;cin>>n;
	f[0]=f[1]=1;
	REP(i,n-1){
		f[i+2] = f[i + 1] + f[i];
	}
	cout << f[n] << endl;
  return 0;
}

C++: #include <stdio.h>
int main()
{
    int x;
    int f[100];
    f[0]=f[1]=1;
    scanf("%d",&x);
    for(int i=2;i<=x;i++){
      f[i]=f[i-1]+f[i-2];
    }
    printf("%d",f[x]);
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <cmath>
#include <cstring>

#define LP(i,n) for(int i=0;i<n;i++)
#define Mset(x,v) memset(x,v,sizeof(x))

using namespace std;
using LL=long long;

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 <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)

vector<int> dp(50,-1);

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

int main() {
    int n;
    scanf("%d", &n);
    printf("%d\n", fib(n));
}

C++: #include <iostream>

using namespace std;

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

C++: #include <sstream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <iostream>
#include <utility>
#include <set>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
using namespace std;
typedef long long ll;
ll fib[50];
ll dfs(int n) {
    if (fib[n] > 0) return fib[n];
    if (n == 0 || n == 1) return 1;
    return fib[n] = dfs(n-1) + dfs(n-2);
}
int main(void) {
    int n;
    cin >> n;
    cout << dfs(n) << endl;
    return 0;
}