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 <stdio.h>
#include <stdlib.h>
int main(){
    int n;
    scanf("%d", &n);
    int f[n+2];
    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>
#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+1;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);
	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 <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
//#define ll long long
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
#define rep(i, n) REP(i, 0, n)
#define rep_rev(i, n) for (int (i) = (int)(n) - 1 ; (i) >= 0 ; --(i))
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
#define all(x) (x).begin(),(x).end()
ll tmp1,tmp2,tmp3;
const ll mod = 1000000007;
const int INF = 1e9;
const ll INFLONG = 1e18;
void swap(ll *x,ll *y){
  ll tmp;
  tmp = *x;
  *x = *y;
  *y = tmp;
}
vector<ll> fib(100,-1);
ll calc_fib(ll k){
  if(fib[k] != -1){
    return fib[k];
  }
  fib[k] = calc_fib(k-1) + calc_fib(k-2);
  return fib[k];
}
int main(){
  fib[0] = 1;
  fib[1] = 1;
  ll n;
  cin >> n;
  rep(i,n){
    calc_fib(i);
  }
  cout << calc_fib(n) << endl;
}

C++: #include<math.h>
#include<cmath>
#include<bitset>
#include<stdio.h>
#include<string>
#include<map>
#include<algorithm>
#include<vector>
#include<iostream>
#include<utility>
using namespace std;
int main(){
  long long int i,n,dp[50];
  scanf("%lld\n",&n);
  dp[0]=1,dp[1]=1;
  for(i=2;i<=n;i++){
    dp[i]=dp[i-1]+dp[i-2];
  }
  printf("%lld\n",dp[n]);
  return 0;
}

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

#define MAX 45

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;

    int F[MAX];

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

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

    cout << F[C] << endl;

    return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <utility>
#include <string>
#include <algorithm>
#include <cmath>
#include <queue>
#include <cstring>
 
typedef long long ll;

#define rep(i,n) for(ll i = 0; i < n; i++)
 
using namespace std;
 
const ll INF = ll(1e18)+1;
const double PI=3.14159265358979323846;

int dp[50];

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

C++: #include <iostream>
#include <vector>
using namespace std;
int fib(int x, vector<int>& f)
{
if (f[x-1] == -1) f[x-1] = fib(x-1, f);
if (f[x-2] == -1) f[x-2] = fib(x-2, f);
return f[x-1] + f[x-2];
}

int main()
{
int x; cin >> x;
vector<int> f(x+1, -1); f[0] = f[1] = 1;
cout << fib(x, f) << endl;
return 0;
}

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

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

    int first = 1;
    int second = 1;
    
    for (int i = 2; i < input; ++i) {
        int third = first + second;
        first = second;
        second = third;
    }
    cout << second << "\n";
    
    return 0;
}

C++: class RecursiveFibonacci:public Fibonacci{
public:
	virtual int calc(int x);
};

int RecursiveFibonacci::calc(int x){
	if(x == 0){
		return 0;
	}else if(x == 1){
		return 1;
	}else{
		return calc(x - 1) + calc(x - 2);
	}
}

C++: using namespace std;

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

    int first = 1;
    int second = 1;
    
    for (int i = 2; i < input; ++i) {
        int third = first + second;
        first = second;
        second = thid;
    }
    cout << second;
    
    return 0;
}

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

int fib(int n);

int main(){
	int n;
	cin >> n;
	cout << fib(n) << endl;
}
	
int fib(int n){
	int num1 = 1,num2 = 1;
	int temp = 0;
	if(n == 0 || n == 1) return 1;
	
	for (int i = 1;i < n;i++){
		temp = num2;
		num2 = num1 + num2;
		num1 = temp;
	}
		return num2;
}

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

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

	return 0;

}

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

int main(){
    int n;
    cin >> n;
    vector<long long> 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 <bits/stdc++.h>
using namespace std;

#define NIL -1

int dp[100];

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

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

C++: fibonacci :: Int -> Int
fibonacci = fibo (1, 1) 2
    where
      fibo :: (Int, Int) -> Int -> Int -> Int
      fibo (pp, prev) pos n
          | n < 2 = 1
          | pos >= n = pp + prev
          | otherwise = fibo (prev, pp+prev) (pos+1) n

main :: IO ()
main = do
  n <- readLn
  putStrLn $ show $ fibonacci n

C++: #include <stdio.h>

int dp[50];

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, i;
    for (i = 0; i < 50; i++)
        dp[i] = -1;

    scanf("%d", &n);
    printf("%d\n", fib(n));

    return 0;
}