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;

//再帰
int fibonacci(int n){
	if(n==0) return 1; //たぶん本当はフィボナッチ数列はf(0)=0 だと思うのだが、問題文がそうなっていたので１を返す。
	else if(n==1) return 1;
	else return fibonacci(n-2) + fibonacci(n-1);
}

//DP
int fibonacci_dp(int n){
	int i;
	int fib[45];

	fib[0]=1;
	fib[1]=1;

	for(i=2; i<=n; i++){
		fib[i]=fib[i-2]+fib[i-1];
	}
	return fib[n];
}

int main() {
	int n;

	cin >> n;
	//cout << fibonacci(n) << endl;
	cout << fibonacci_dp(n) << endl;

	return 0;
}

C++: #include <iostream>

using namespace std;

int A[128];
int fib(int n){
  A[0] =1;
  for(int i=1;i<44;++i){
    A[i] =A[i-1];
    if(i>1)A[i]+=A[i-2];
  }
  return A[n-1];

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

C++: #include <iostream>
#include <stdlib.h>
 
using namespace std;
 
#define MAX_N 44

class Fib{
private:
  int size;
  int *A;
public:
  Fib(int size){
    this->size = size;
    makeFib();
  }

  int getFib(int n){
    return A[n];
  }

  void makeFib(){
    int i;
    this->A = (int*)malloc(sizeof(int)*(this->size+1));
    this->A[0] = 1;
    this->A[1] = 1;
    for(i = 2;i <= this->size;i++){
      this->A[i] = this->A[i-2]+this->A[i-1];
    }
  }

  ~Fib(){
    free(A);
  }
};
 
int main(){
 
    int n;
    Fib *fib = new Fib(MAX_N); 

    cin >> n;
 
    cout << fib->getFib(n) << endl;
 
    delete fib;

    return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
	int n;
	int Fibo[50];
	Fibo[0] = 1;
	Fibo[1] = 1;

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

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

using namespace std;

#define rep(i, n) for (int i = 0; i < n; ++i)


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

    int fib[50];
    fib[0] = 1;
    fib[1] = 1;

    for (int i = 2; i <= n; ++i) {
        fib[i] = fib[i-2] + fib[i-1];
    }


    cout << fib[n] << "\n";

    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 < 50; i++) F[i] = F[i-1] + F[i-2];
    cout << F[n] << endl;
    return 0;
}

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

long long Fib(int n){
	vector<long long> F(n+1);
	int i;
	F[0]=1;
	F[1]=1;
	for (i=2;i<=n;i++){
		F[i]=F[i-1]+F[i-2];
	}
	return F[n];
}

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	int n;
	cin >> n;
	
	cout << Fib(n)<<endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

int A[128]
int fib(int n){
  A[0] =1
  for(int i=1;i<n;++i){
    A[i] =A[i-1];
    if(i>2)A[i]+=A[i-2];
    if(i>3)A[i]+=A[i-3];
  }
  return A[n-1];

}

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

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

long long fib[MAX];

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

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1);
#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME
#define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) {
REP(i,v.size()){if(i)os<<" ";os<<v[i];}return os;}
template<typename T> ostream& operator<<(ostream& os, const vector<vector<T>>& v) {
REP(i,v.size()){if(i)os<<endl;os<<v[i];}return os;}

int main() {
    // Write Your Code Below
    int n; cin >> n;
    vector<ll> dp(n+1);
    dp[0] = 1;
    dp[1] = 1;
    for(int i=2;i<=n;i++){
        dp[i] = dp[i-1] + dp[i-2];
    }
    cout << dp[n] << endl;

}

C++: #include <cstdio>
#define REP(I,n) for(int i=2;i<=n;i++)
using namespace std;
int main(){
  int n;
  int F[45]={0};
  scanf("%d",&n);
  F[0]=F[1]=1;
  REP(i,n) F[i]=F[i-1]+F[i-2];
  printf("%d\n",F[n]);
  return 0;
}

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

const char wall = '#';
vector<vector<char>> fields;
vector<vector<bool>> used;
vector<vector<ll>> dist;
const int dx[4] = {0, -1, 0, 1};
const int dy[4] = {1, 0, -1, 0};

ll N;
vector<ll> F(44, 0);

ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) { return b/gcd(a,b)*b;}

void fibo(ll n) {
  if (n == 0) F[0] = 1;
  else if (n == 1) F[1] = 1;
  else F[n] = F[n-1] + F[n-2];
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> N;
  rep(i, N) {
    fibo(i);
  }
  if(N < 2) cout << 1 << endl;
  else cout << F[N-1]+F[N-2] << endl;
  return 0;
}

C++: #include<cstdio>

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

C++: #include<bits/stdc++.h>
#define int long long
using namespace std;
 
signed main(){
	vector<int>a(45);
	a[0]=a[1]=1;
	for(int b=2;b<45;b++)a[b]=a[b-1]+a[b-2];
	int c;
	cin>>c;
	cout<<a[c]<<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;
}