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;
#define int long long

//----***型定義***----
using ll = long long;
using P = pair<int,int>;

//----***Like a Pythonista***----
#define REP(ii,jj,nn) for (ll ii=jj;ii<(nn);ii++)
#define RREP(ii,nn,jj) for (ll ii = nn; jj<ii;ii--)
#define each(i,...) for (auto&& i:__VA_ARGS__)
#define ALL(vec) (vec).begin(),(vec).end()
#define sum(...) accumulate(ALL(__VA_ARGS__),0LL)
#define dsum(...) accumulate(ALL(__VA_ARGS__),0.0)
#define vec(type,name,...) vector<type> name(__VA_ARGS__)
template<class T> inline auto max(const T& a){ return *max_element(ALL(a)); }
template<class T> inline auto min(const T& a){ return *min_element(ALL(a)); }
inline ll gcd(ll a,ll b){if(b == 0) return a;return  gcd(b,a%b);}
inline ll lcm(ll a,ll b){ll g = gcd(a,b);return a / g * b;}

//----***定数***----
#define MOD 1000000007
#define INF 100000000000000000
#define EPS 1e-9
const vector<vector<int>> DXY={{-1,0},{1,0},{0,-1},{0,1}};

//----***パーツ***----
#define fr first
#define se second

//----***入出力***---
#define print(out) cout<< out  << "\n";
#define debug(var)  do{std::cerr << #var << " ↓ "<<"\n";view(var);}while(0);
#define dbg cerr<<"🥺🥺🥺🥺🥺🥺"<<endl;
template<typename T> void view(T e){std::cout << e << std::endl;}
template<typename T> void view(const std::vector<T>& v){for(const auto& e : v){ std::cout << e << " "; } std::cout << std::endl;}
template<typename T> void view(const std::vector<std::vector<T> >& vv){ for(const auto& v : vv){ view(v); } }

//----***初期時読み込み***----
struct initial{initial(){cin.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(15);};}initial_;

vector<int> memo(50,0);

int fibo(int n){
  if(memo[n]!=0){return memo[n];}
  memo[n]=fibo(n-1)+fibo(n-2);
  return memo[n];

}

signed main(){
  int N;cin>>N;
  memo[0]=memo[1]=1;
  int ans =fibo(N);
  print(ans)



}

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

int dp[45];

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

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

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

int fib[45];
void make_fib(){
	fib[0] = 1;
	fib[1] = 1;
	for (int i=2;i<MAX;i++) {
	fib[i] = fib[i-1] + fib[i-2];
	}
}

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

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


void fibonacci(int n){
  vector<int> fib;

  fib.push_back(1);
  fib.push_back(1);

  for(int i = 2;i < n;i++){
    fib.push_back(fib.at(i - 2) + fib.at(i - 1));
  }

  cout << fib.at(n - 1) << endl;

}

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

  return 0;
}

C++: #include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <queue>
#include <string>
#include <numeric>
#include <vector>

using namespace std;

int memo[45] = {0};

int fibo(int n){
  if(memo[n] != 0){
    return memo[n];
  }
  if(n == 0){
    memo[0] = 1;
    return memo[0];
  }else if(n == 1){
    memo[1] = 1;
    return memo[1];
  }else{
    memo[n] = fibo(n-1) + fibo(n-2);
    return memo[n];
  }
}


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

  return 0;
}

C++: #include<bits/stdc++.h>
#define INF 1e9
using namespace std;
int num[50];
int fib(int n){
    if(n==0 || n==1) return 1;
    else if(num[n]!=INF) return num[n];
    else return fib(n-1) + fib(n-2);
}
int main(){
    for(int i=0;i<50;i++) num[i]=INF;
    for(int i=0;i<45;i++){
        num[i]=fib(i);
    }
    int n;
    cin>>n;
    cout<<num[n]<<endl;
    return 0;
}

C++: #include <cstdio>

int main() {
	int n;
	int F[50];
	scanf("%d", &n);

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

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

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

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

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

C++: #include <iostream>

using namespace std;

int fib(int n);

int memo[45];

int main() {
  int n;

  //入力
  cin >> n;

  // 出力
  cout << fib(n) << endl;

  return 0;
}

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

using namespace std;
int n;
int a[50];

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

C++: #include <iostream>
#include <stdio.h>
#include <fstream>
#include <algorithm>
#include <string>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <limits.h>
#include <math.h>
#define rep(i,n) for (int i = 0; (i) < (n); ++ (i))
using namespace std;

int fib(unsigned int n);

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

int fib(unsigned int n) {
    vector<int> ary(n+1);
    ary[0] = 1;
    ary[1] = 1;
    for(int i = 2; i <= n; ++i) ary[i] = ary[i-1] + ary[i-2];
    return ary[n];
}

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

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