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 main()
{
	int n;
	cin >> n;
	long long fib[50];
	fib[0] = fib[1] = 1;
	for (int i = 2; i <= n; i++) {
		fib[i] = fib[i - 1] + fib[i - 2];
	}
	cout << fib[n] << endl;
	return 0;
}

C++: #include<iostream>
#include<cmath>
#include<algorithm>
#include<string>
#include<vector>
#include<stack>
#include<queue>
#include<set>
#include<map>
#include<iomanip>
#include<bitset>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef pair<ll,P> P1;
typedef pair<P,P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define fi first
#define sc second
#define rep(i,x) for(ll i=0;i<x;i++)
#define repn(i,x) for(ll i=1;i<=x;i++)
#define SORT(x) sort(x.begin(),x.end())
#define ERASE(x) x.erase(unique(x.begin(),x.end()),x.end())
#define POSL(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define POSU(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())

const int MAX = 510000;
const int MOD = 1000000007;

int main(){
  vector<ll> dp(MAX);
  ll N; cin >> N;
  dp[0] = 1; dp[1] = 1;
  rep(i,N){
    dp[i + 2] = dp[i] + dp[i + 1];
  }
  cout << dp[N] << endl;

}

C++: // fibonacci number.
#include<stdio.h>

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

C++: #include<stdio.h>
#include<queue>
#include<algorithm>
using namespace std;
int a[100];
int main(){
int n;
a[1]=1;
a[2]=1;
scanf("%d",&n);
  for (int i=3;i<=n+1;i++)
    a[i]=a[i-1]+a[i-2];
    printf("%d\n",a[n+1]);
return 0;}

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

#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define all(x) (x).begin(),(x).end()
using ll = long long;
string char_to_string(char val) {
  return string(1, val);
}
int char_to_int(char val) {
  return val - '0';
}
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 vector_finder(std::vector<ll> vec, int number) {
  auto itr = std::find(vec.begin(), vec.end(), number);
  size_t index = std::distance( vec.begin(), itr );
  if (index != vec.size()) { // 発見できたとき
    return 1;
  }
  else { // 発見できなかったとき
    return 0;
  }
}

// DP
int n; 
vector<ll> dp;
ll fibo(int i) {
  dp[0] = 1; dp[1] = 1;
  for(int i = 2; i <= n; ++i) {
    dp[i] = dp[i - 1] + dp[i - 2];
  }
  return dp[n];
}

int main() {
  cin >> n; dp.resize(100);
  cout << fibo(n) << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0, i##_len = (n); i < i##_len; i++)
#define reps(i, s, n) for(ll i = (s), i##_len = (n); i < i##_len; i++)
#define rrep(i, n) for(ll i = (n) - 1; i >= 0; i--)
#define rreps(i, e, n) for(ll i = (n) - 1; i >= (e); i--)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((ll)(x).size())
#define len(x) ((ll)(x).length())

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    // ifstream in("input.txt");
    // cin.rdbuf(in.rdbuf());
    ll n;
    cin >> n;
    n++;
    vector<ll> dp(n);
    dp[0] = 1; dp[1] = 1;
    rep(i, n - 2) {
        dp[i + 2] = dp[i] + dp[i + 1];
    }
    cout << dp[n - 1] << endl;
    return 0;
}

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


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

int main()
{
    int C;

    cin >> C;

    cout << fibonacci(C) << endl;

    return 0;
}

C++: #include "bits/stdc++.h"

using namespace std;

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

	return 0;
}

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

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

int F[MAX];

int main(){
  F[0]=F[1]=1;
  int n;
  cin>>n;
  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 fn[50];
  fn[0] = fn[1] = 1;
  for(int i = 2; i <= n; i++) fn[i] = fn[i - 1] + fn[i - 2];

  cout << fn[n] << end;
  }
  return 0
}

C++: #include<iostream>
using namespace std;
int main(){
    int i,a;
    int A[50];
    cin>>a;
    A[0]=A[1]=1;
    for(i=2;i<=a;i++) A[i]=A[i-1]+A[i-2];
    cout<<A[a]<<endl;
    return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cctype>
#include <climits>
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <list>
#include <queue>
#include <deque>
#include <algorithm>
#include <numeric>
#include <utility>
#include <complex>
#include <memory>
#include <functional>
 
using namespace std;
 
#define ALL(g) (g).begin(),(g).end()
#define REP(i, x, n) for(int i = x; i <= n; i++) //変数,初期値,終値
#define rep(i,n) REP(i,0,n)
#define F(i,j,k) fill(i[0],i[0]+j*j,k)
#define P(p) cout<<(p)<<endl;
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define INF 1<<25
#define pb push_back
 
typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int,int> pii;
typedef pair<long,long> pll;
typedef long long ll;

int dp;
int memo;
int fib(int n);

int main(void)
{
    int n;
    int ans=0;
    cin >> n;
    ans = fib(n);
    
    cout << ans << endl;
    
    return 0;
}
int fib(int n)
{
    if(n==0 || n==1)return 1;
    else return fib(n-1)+fib(n-2);
}