Go: package main

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

var (
	nstr   func() string
	stdout *bufio.Writer
)

func init() {
	nstr = newReadString(os.Stdin)
	stdout = bufio.NewWriter(os.Stdout)
}

func main() {
	defer stdout.Flush()
	n := nint()
	r := fibonacci(n)
	fmt.Println(r)
}

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

	}

}

func newReadString(ior io.Reader) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+11))
	r.Split(bufio.ScanWords)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

func nint64() int64 {
	i, err := strconv.ParseInt(nstr(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

func nint() int {
	return int(nint64())
}

func getIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = nint()
	}
	return b
}

func getStringSlice(n int) []string {
	b := make([]string, n)
	for i := 0; i < n; i++ {
		b[i] = nstr()
	}
	return b
}

func gcd(x, y int) int {
	if y == 0 {
		return x
	}
	return gcd(y, x%y)
}

func lcm(x, y int) int {
	return x * y / gcd(x, y)
}

func contains(s []int, e int) bool {
	for _, a := range s {
		if a == e {
			return true
		}
	}
	return false
}

func bin(i int, prefix bool) string {
	i64 := int64(i)

	if prefix {
		return "0b" + strconv.FormatInt(i64, 2)
	} else {
		return strconv.FormatInt(i64, 2)
	}
}

func strReverse(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}

	return string(runes)
}

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

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

    printf("%d\n", result);

    return 0;
}

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

int fib(int n){
//  return (n == 0 || n == 1) ? 1 : fib(n - 1) + fib(n - 2);
  int memo[1000] = {1, 1};
  for(auto i = 2; i <= n; i++){
    memo[i] = memo[i - 1] + memo[i - 2];
  }
  return memo[n];
}

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

  cout << fib(n) << endl;
   return 0;
}

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

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

C++: #include <iostream>

using namespace std;

int fib(int n) {
    int a = 1;
    int b = 1;

    int i = 0;
    while (i < n) {
        int tmp = a;
        a = b;
        b += tmp;
        ++i;
    }
    return a;
}

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

    cout << fib(n) << endl;

    return 0;
}

C++: #include<stdio.h>
#include<algorithm>
#include<string.h>
using namespace std;
#define NIL -2000000001
#define MAX 2000

int A[MAX];
int n = 0;

int fib(int num) {
  if (A[num] != NIL) {
    return A[num];
  } else {
    A[num-2] = fib(num-2);
    A[num-1] = fib(num-1);
    return A[num-2]+A[num-1];
  }
}

int main() {
  int num;
  for ( int i = 0; i < MAX; i++ ) {
    A[i] = NIL;
  }
  A[0] = 1;
  A[1] = 1;
  scanf("%d", &num);
  printf("%d\n", fib(num));
  return 0;
}

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

using namespace std;

int fib(int n) {
    return n <= 1 ? 1 : fib(n - 1) + fib(n-2);
}

int dp[1000];

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

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

int fibloop(int n){
    int fib,fib2;
    fib = fib2 = 1;
    for (int i = 2; i < n; ++i){
        int tmp = fib;
        fib = fib + fib2;
        fib2 = tmp;
    }
    return fib;
}

int main(){
    //freopen("in", "r", stdin);
    int n;
    cin >> n;
    cout << fibloop(n+1) << endl;
    return 0;
}

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

int fib(int n, int a, int b);

int main()
{
	int n;
	cin >> n;
	cout << fib(n - 1, 1, 1) << endl;
	return (0);
}


int fib(int n, int a, int b){
	int f;
	f = a;
	if (n >= 1){
		f = fib(n - 1, a + b, a);
  }
	return (f);
}

C++: #include<bits/stdc++.h>
#define N 50
using namespace std;
int n;
vector<int> data(N);


void fibo(int n){
	data.at(0) = data.at(1) = 1;
	for(int i=2;i<=n;i++) data.at(i) = data.at(i-1) + data.at(i-2);
}

int main(){
	cin >> n;
	fibo(n);
	cout << data.at(n) << endl;
}

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

int main(){

    int fib[50];
    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>
using namespace std;

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

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

C++: #include<iostream>
using namespace std;
int n,fibonacci,f[44]={0};

int makefibnacci(int n){
  f[0]=1;
  f[1]=1;
  for(int i = 2; i <=n; i++){
    f[i]=f[i-2]+f[i-1];
  }
  return f[n];
}

int main(){
  cin >> n;
  fibonacci = makefibnacci(n);
  cout << fibonacci << endl;
  return 0;
}

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

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

#define rep(i, n) for (int i=0; i<(n); ++i)
using ll = long long;
using P = pair<int, int>;

int dp[50];

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

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

  int ans = fib(n);
  cout << ans << endl;
  return 0;
}

C++: #include <bits/stdc++.h>
#ifdef _DEBUG
#include "debug.hpp"
#else
#define debug(...)
#endif
#define REP(i, m, n) for(int (i) = (m); (i) < (n); ++i)
#define rep(i, n) REP(i, 0, n)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const int INF = 1e9 + 7;
const ll LINF = 1LL << 60;
template<class T, class U> inline bool chmax(T &a, const U &b) { if(a < b) { a = b; return true; } return false; }
template<class T, class U> inline bool chmin(T &a, const U &b) { if(a > b) { a = b; return true; } return false; }

int n, dp[50];
int dfs(int i) {
  if(dp[i] >= 0) return dp[i];
  if(i == 0 || i == 1) return dp[i] = 1;
  int res = dfs(i-1) + dfs(i-2);
  return dp[i] = res;
}

int main() {
  cin.tie(0); ios::sync_with_stdio(false);
  rep(i,50) dp[i] = -1;
  cin >> n;
  cout << dfs(n) << '\n';
  return 0;
}

C++: #include <iostream>

using namespace std;

int fib(int n);

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 return fib(n-1) + fib(n-2);
}