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>
#define rep(i, a, b) for (int i = a; i < (b); i++)
#define rrep(i, a, b) for (int i = a; i >= (b); i--)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
using P = 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;
}
void hr() {
   cerr << "--------------" << endl;
}
const int INF = 1001001001;
const int MOD = 1000000007;
// const int MOD = 998244353;
int memo[100];
int f(int n) {
   if (memo[n] != 0) return memo[n];
   if (n == 0 || n == 1) return 1;
   return memo[n] = f(n - 1) + f(n - 2);
}
int main() {
   cin.tie(0);
   ios_base::sync_with_stdio(0);

   int n;
   cin >> n;
   int ans = f(n);
   cout << ans << endl;
   return 0;
}

C++: #include <iostream>

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

int main(void)
{
int n;
std::cin >> n;
std::cout << fib(n) << std::endl;
return 0;
}

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

#define MAX_N 44

using namespace std;

int fibonacci[MAX_N];

int fibo(int n){
  if(fibonacci[n]>0){
    return fibonacci[n];
  }else{
    if(n==0 || n==1){
      fibonacci[n]=1;
      return fibonacci[n];
    }else{
      fibonacci[n]=fibo(n-1)+fibo(n-2);
      return fibonacci[n];
    }
  }
}

  


int main(){
  for(int i=0;i<MAX_N;i++){
    fibonacci[i] = 0;
  }


  int n;
  cin >> n;
  cout << fibo(n);
  
}

C++: #include<bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i) 
#define PI acos(-1)

using namespace std;
using ll = long long;
using P = pair<int, int>;

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

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

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

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

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

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

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

#define int long long

const int N = 44 + 5;
int fib[N];

void pre(){
  fib[0] = 1, fib[1] = 1;
  for(int i = 2; i < N; i++){
	   fib[i] = fib[i - 1] + fib[i - 2];  
	}	
}

int32_t main(){
	pre();
	int n;
	cin >> n;
	cout << fib[n] << endl;
	
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <string>
#include <cctype>
#include <stack>
#include <queue>
#include <vector>
#include <cstdlib>
#include <list>
#define _USE_MATH_DEFINES
#include <math.h>

using namespace std;

int main() {

	int n;
	int F[44];
	cin >> n;

	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<iostream>
#include<algorithm>
using namespace std;

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

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


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

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

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

int F[100]; int N;

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

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

long F[45] = {};

void calcfib(){
	for (long i = 0; i < 45; i++){
		if (i == 0 || i == 1) F[i] = 1;
		else F[i] = F[i - 1] + F[i - 2];
	}
}

int main(){
	long n;
	cin >> n;
	calcfib();
	cout << F[n] << endl;
	return 0;
}

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

int main()
{
 int n; cin>>n;
 vector<ll> fib(n + 1);
 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<algorithm>
#include<climits>
#include<cmath>
#include<iomanip>
#include<iostream>
#include<list>
#include<map>
#include<numeric>
#include<queue>
#include<set>
#include<stack>
#include<utility>
#include<vector>

#define lint long long
#define REP(i, x, n) for(int i = x ; i < n ; i++)
#define rep(i, n) REP(i, 0, n)
#define repr(i, n) for(int i = n - 1 ; i >= 0 ; i--)
#define SORT(c) sort((c).begin(), (c).end())
#define SORT_INV(c) sort((c).begin(), (c).end(), greater<int>())
#define IINF INT_MAX
#define LLINF LLONG_MAX

using namespace std;

lint fib[50] = {0};

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

C++: #define scanf_s scanf
#include <iostream>
using namespace std;
int F[46] = { 0 };
int fib(int n) 
{
	if (n >= 0) {
		if (n <= 1) { return F[n] = 1; }
		if (F[n] != 0) {
			return F[n];
		}
		return F[n] = fib(n - 1) + fib(n - 2);
	}
}
int main(void)
{
	int n;
	scanf_s("%d", &n);
	printf("%d\n", fib(n));
}

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

static const int maxn=44;

int DP[45];

int Fibonacci(int n) {
  if (n==0 or n==1) {
    return DP[n]=1;
  }
  if (DP[n]!=(-1)) {
    return DP[n];
  }
  return DP[n]=Fibonacci(n-1)+Fibonacci(n-2);
}
int main() {
  std::ios::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  memset(DP,(-1),sizeof(DP));
  Fibonacci(maxn);
  int n;
  cin>>n;
  cout<<DP[n]<<endl;
  return 0;
}