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 <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 <bits/stdc++.h>
using namespace std;

int fib(int n){
  if (n <= 1) return (1);
  else  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;

int main(){
  int n;cin >> n;
  long long a=1, b=1, c;
  for(int i=0;i<n-1;i++){
    c = b;
    b = a;
    a = b + c;
  }
  cout << a << endl;
}

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

using ll = long long;

vector<ll> F(45, 0);
long fibDP(int n) {
	if(n <= 1) return F[n] = 1;
	if(F[n] != 0) return F[n];
	return F[n] = fibDP(n-1) + fibDP(n-2);
}

int main() {
	int n; cin >> n;
	cout << fibDP(n) << endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

const int N = 45;
int fib[N];

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

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

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

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

int main(){
    int n;
    cin >> n;
    int a1 = 1, a2 = 1, temp;
    for(int i = 1; i < n; i++){
        temp = a2;
        a2 += a1;
        a1 = temp;
    }
    printf("%d\n", a2);
    return 0;
}

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

int A[2000000],N = 0,dp[45];

int fibonacci(int n) {

  if(dp[n] != 0) return dp[n];

  if(n == 0 || n == 1) return dp[n] = 1;
  else return dp[n] = fibonacci(n - 1) + fibonacci(n - 2);
}


int main() {

  int N;
  cin >> N;

  int ans = fibonacci(N);
  cout << ans << endl;

}

C++: #include <iostream>

int Fib[45];

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

  Fib[0]=Fib[1]=1;
  for(int i=2; i<=n; i++){
    Fib[i] = Fib[n-1]+Fib[i-2];
  }
  std::cout << Fib[n] << std::endl;

  return 0;
}

C++: #include <algorithm>
#include <complex>
#include <cstdlib>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

using namespace std;
#define SAY_YES cout << "YES" << endl;
#define SAY_Yes cout << "Yes" << endl;
#define SAY_NO cout << "NO" << endl;
#define SAY_No cout << "No" << endl;
#define IFYES(TRUE_OR_FALSE)   \
    if (TRUE_OR_FALSE)         \
    {                          \
        cout << "YES" << endl; \
    }                          \
    else                       \
    {                          \
        cout << "NO" << endl;  \
    }
#define IFYes(TRUE_OR_FALSE)   \
    if (TRUE_OR_FALSE)         \
    {                          \
        cout << "Yes" << endl; \
    }                          \
    else                       \
    {                          \
        cout << "No" << endl;  \
    }
#define IFyes(TRUE_OR_FALSE)   \
    if (TRUE_OR_FALSE)         \
    {                          \
        cout << "yes" << endl; \
    }                          \
    else                       \
    {                          \
        cout << "no" << endl;  \
    }
#define DEBUG_OUTPUT_ARRAY(XXX, ONE)                            \
    for (int i = 0; i < (ONE); i++)                             \
    {                                                           \
        cout << "DEBUG: i = " << i << " -> " << XXX[i] << endl; \
    }
#define DEBUG_OUTPUT_ARRAY2(XXX, ONE, TWO)                             \
    for (int i = 0; i < (ONE); i++)                                    \
    {                                                                  \
        cout << "<<< i = " << i << " >>>" << endl;                     \
        for (int j = 0; j < (TWO); j++)                                \
        {                                                              \
            cout << "DEBUG: j = " << j << " -> " << XXX[i][j] << endl; \
        }                                                              \
    }
#define DEBUG_OUTPUT_ARRAY2_BOX(XXX, ONE, TWO) \
    for (int i = 0; i < (ONE); i++)            \
    {                                          \
        cout << i << "  ";                     \
        for (int j = 0; j < (TWO); j++)        \
        {                                      \
            cout << XXX[i][j] << " ";          \
        }                                      \
        cout << endl;                          \
    }

typedef pair<long long int, long long int> pll;


const long long int mod = 1000000007;
const long long int INF = 99999999999999999;


long long int N,dp[55]={};
int main()
{
    cout << fixed << setprecision(18);
    cin>>N;
    dp[0]=1;
    dp[1]=1;
    for(long long int i = 2; i < 50; i++){
        dp[i]=dp[i-1]+dp[i-2];
    }
    cout<<dp[N]<<endl;
}

C++: #include<stdio.h>

int main(void){
    int i, n, F[45] = {};
    scanf("%d", &n);

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

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

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

    return 0;
}

C++: // input: aldsalds1_10_a.in
#include<iostream>
#define MAX_N 45
#define NIL -1
using namespace std;

int dp[MAX_N];

int fib(int n) {
  if(n == 0 || n == 1)
    return 1;

  if(dp[n] != NIL)
    return dp[n];

  int v = fib(n-1) + fib(n-2);
  dp[n] = v;

  return v;
}

int main() {
  for(int i=0; i<MAX_N; i++)
    dp[i] = NIL;

  int x;
  cin >> x;

  cout << fib(x) << endl;
}

C++: #include<iostream>
#include<set>
#include<queue>
#include<algorithm>
#include<vector>

using namespace std;

int main(){

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

    return 0;
}