Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func getScanner(fp *os.File) *bufio.Scanner {
	scanner := bufio.NewScanner(fp)
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 500001), 500000)
	return scanner
}

func getNextString(scanner *bufio.Scanner) string {
	scanner.Scan()
	return scanner.Text()
}

func getNextInt(scanner *bufio.Scanner) int {
	i, _ := strconv.Atoi(getNextString(scanner))
	return i
}

func main() {
	fp := os.Stdin
	if len(os.Args) > 1 {
		fp, _ = os.Open(os.Args[1])
	}

	scanner := getScanner(fp)
	writer := bufio.NewWriter(os.Stdout)

	n := getNextInt(scanner)

	fmt.Fprintln(writer, fib(n))
	writer.Flush()

}

func fib(n int) int {
	if n <= 1 {
		return 1
	}
	dp := make([]int, n+1)
	dp[0] = 1
	dp[1] = 1
	for i := 2; i <= n; i++ {
		dp[i] = dp[i-2] + dp[i-1]
	}
	return dp[n]
}

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

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP0(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REP1(i,n) for(int i=1, i##_len=(n); i<=i##_len; ++i)
#define RREP0(i,n) for(int i=n-1; i>=0; --i)
#define RREP1(i,n) for(int i=n; i>=1; --i)

#define SORT(c) sort((c).begin(),(c).end())
#define whole(f,x,...) ([&](decltype((x)) whole) { return (f)(begin(whole), end(whole), ## __VA_ARGS__); })(x)
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define CLR(a) memset((a), 0 ,sizeof(a))

inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

typedef long long LL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;

const int INTINF = 2147483647;
const LL LLINF = 9223372036854775807;
const double EPS = 1e-10;
const double PI  = acos(-1.0);

int gcd(int a,int b){return b?gcd(b,a%b):a;}
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
VI F;

int main(int argc, char const *argv[]) {
  cin.tie(0); ios::sync_with_stdio(false);
  int n; std::cin >> n;
  F.reserve(100);
  F.PB(1); F.PB(1);
  for (int i = 2; i <= n; i++) {
    F.PB(F[i-1]+F[i-2]);
  }
  std::cout << F[n] << '\n';
  return 0;
}

C++: #include <cstdio>
#include <algorithm>

using namespace std;

#define MAX 45
#define NIL -1
int Memo[MAX];

int fibonacci(int n) {
    if (n == 0 || n == 1)
        return Memo[n] = 1;
    if (Memo[n] != NIL)
        return Memo[n];
    return Memo[n] = fibonacci(n - 1) + fibonacci(n - 2);
}

int main() {
    int n;
    scanf("%d", &n);
    fill_n(Memo, MAX, NIL);
    printf("%d\n", fibonacci(n));
}

C++: #include <iostream>
int main(){
    int n;
    std::cin >> n;
    int dp[n + 1];
    if(n == 0 || n == 1){
        std::cout << 1 << std::endl;
        return 0;
    }
    dp[0] = 1;
    dp[1] = 1;
    for(int i = 2; i < n + 1; i++){
        dp[i] = dp[i - 1] + dp[i - 2];
    }
    std::cout << dp[n] << std::endl;
}

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

int Fibonatch(int result[], int num)
{
    int ret = result[num];

    if (ret != 0) {
        if (num > 1) {
            ret = Fibonatch(result, num - 1) + Fibonatch(result, num - 2);
        }
        else {
            ret = 1;
        }
        result[num] = ret;
    }

    return ret;
}

int main(void)
{
    int num;
    int ret[45] = {0};

    scanf("%d", &num);
    result = Fibonatch(ret, num);
}

C++: #include<iostream>
using namespace std;
using ll = long long;
int fib[100];
int main(){
  ll n;
  cin >> n;
  fib[0] = 1;
  fib[1] = 1;
  for (ll i = 0; i < n; i++) {
    fib[i+2] = fib[i+1] + fib[i];
  }

  cout << fib[n] << endl;
  
  return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <utility>
#include <cmath>
#include <random>
#include <vector>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <algorithm>
using namespace std;

#define rep(i,n) for(int i = 0; i<n; ++i)
#define REP(i,n) for(int i = 1; i<=n; ++i)
#define all(x) begin(x),end(x)
typedef long long ll;
typedef pair<int,int> ip;
typedef pair<ll,ll> lp;
const int inf = 1001001000;
const ll INF = 1LL<<60;
const int MOD = (int)1e9 + 7;

int main(){
	int n;
	cin>>n;
	ll dp[47];
	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>
#include <algorithm>
using namespace std;
 
static const int N= 100;
int p[N+1], m[N+1][N+1];
 
int main() {
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    for(int i=1; i<=n; i++){
      cin >> p[i-1] >> p[i];
    }
    for(int i=1; i<=n; i++) m[i][i] = 0;
 
    for(int l=2; l<=n; l++){
      for(int i=1; i<=n-l+1; i++){
        int j = i + l -1;
        m[i][j] = ( 1 << 21);
        for(int k=i; k<=j-1; k++){
          m[i][j] = min(m[i][j], m[i][k] + m[k+1][j] + p[i-1]*p[k]*p[j]);
        }
      }
    }
    cout << m[1][n] << endl;
}

C++: #include<bits/stdc++.h>

#define _GLIBCXX_DEBUG
#define all(v) (v).begin(),(v).end()

using namespace std;

using ll=long long;
using pii=pair<int, int>;
using vi=vector<int>;

const ll INF=1LL<<60;
const int MOD=1e9+7;

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

C++: #include <iostream>
#include <string>
using namespace std;
int main()
{
 int a=1;
 int b=1;
 int n;
 cin >>n;
 if(n%2==0){
   for(int i=0;2*i<n-2;i++){
    a+=b;
    b+=a;
   }
    cout << b << endl;
   }else{
       for(int s=0;2*s<n-1;s++){
           a+=b;
           b+=a;
       }
    cout << a << endl;
   }
}

C++: #include<stdio.h>

int dq[50];

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

int main() {
	int n, i;
	for (i = 0; i < 50; i++) {
		dq[i] = -1;
	}

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

	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int n; cin>>n;
	int r[] = {1,1,2};
	if( n<=2 ){
		cout<<r[n]<<endl;
		return 0;
	}
	while( n>0 ){
		int tmp = r[1] + r[2];
		r[0] = r[1]; r[1] = r[2]; r[2] = tmp;
		n = n-1;
	}
	cout<<r[0]<<endl;
	return 0;
}

C++: #include<cstdio>
int F[45];
int n;
int fibonacci(int n){
	if(n == 0 || n == 1){
		return F[n] = 1;
	}
	if(F[n] != 0){
		return F[n];
	}
	return F[n] = fibonacci(n-2) + fibonacci(n-1);
}

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

C++: #include<iostream>

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>
using namespace std;

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

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

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

int makeFibonacci(int n) {
	int a[100];
	a[0] = 1;
	a[1] = 1;

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

	return a[n];
}


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

	int ans = makeFibonacci(n);

	cout << ans << endl;

	return 0;

}