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>
#include <sstream>
#include <fstream>
#include <algorithm>
#include <string>
#include <stack>
#include <queue>
#include <map>
#include <list>
#include <vector>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <climits>
using namespace std;

long *memo;
long fib(long n){
	if(n < 2) return 1;
	return memo[n] != -1 ? memo[n] : (memo[n] = fib(n-1) + fib(n-2));
}

int main() {
	memo = new long[64];
	for(int i = 0; i < 64; i++){
		memo[i] = -1;
	}
	
	long n;
	cin >> n;
	cout << fib(n) << endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

int num[47];

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

int main(){
  int n;
  cin >> n;
  num[0] = 1;
  num[1] = 1;
  n = fib(n);
  cout << n << endl;
  return 0;
}

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

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

/*int main(){
    int n;cin >> n;
    if(n==0||n==1) {cout << 1 << endl;return 0;}
    vector<int> fb(n+1);
    fb[0] = 1;
    fb[1] = 1;
    for(int i=2;i<=n;i++){
        fb[i] = fb[i-1]+fb[i-2];
    }
    cout << fb[n] << endl;
    return 0;
}*/

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

C++: #include <iostream>
using namespace std;
int fib(int n,int num1,int num2);
int main(void)
{
	int n;
	cin >> n;
	cout << fib(n,1,0) << endl;
	return 0;
}
int fib(int n,int num1,int num2)
{
	if(n<2) return num1+num2;
	return fib(n-1,num1+num2,num1);
}

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

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

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

int main(){
    int n; cin >> n;
    long long arr[45] = {1,1};
    if (n == 1 || n == 0) cout << 1 << endl;
    else {
        for(int i = 2; i <= n; ++i){
            arr[i] = arr[i-1] + arr[i-2];
        }
        cout << arr[n] << endl;
    }
    
    return 0;
}

C++: void fibonacci_1(const int count , int data[]) {
	data[0] = 1;
	if(count == 1) return;
	data[1] = 1;
	
	for( int i = 2; i < count ; i++) {
		data[i] = data[i-1]+data[i-2];
	}
}

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

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

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

C++: #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#define MAX 44
#define NIL
using namespace std;

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

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

#define REP( i, n) for( int i = 0; i < (n); ++i)
#define FOR( i, a, b) for( int i = (a); i < (b); ++i)

#define pb push_back

const int INF = 100100100;
const int MOD = (int)1e9 + 7;

using ll = long long;

using namespace std;

int dp[44];

ll f( int n){

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

int main(){

  int x;
  REP( i, 44){
    dp[i] = 0;
  }

  dp[0] = 1;
  dp[1] = 1;

  cin >> x;
  cout << f(x) << endl;

}

C++: #include <map>
#include <set>
#include <list>
#include <cmath>
#include <deque>
#include <queue>
#include <stack>
#include <cstdio>
#include <string>
#include <vector>
#include <complex>
#include <cstdlib>
#include <cstring>
#include <numeric>
#include <utility>
#include <iostream>
#include <algorithm>
#include <functional>
#include <unordered_map>
#include <unordered_set>

using namespace std;

#define ll long long
#define ull unsigned long long
#define INF (1 << 30)
#define LLINF (1LL << 62)
#define MOD7 1000000007
#define MOD9 1000000009
#define eps 1e-9
#define P pair<int, int>
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pul pair<ull, ull>
#define all(a) (a).begin(), (a).end()
#define FOR(i,a,b) for (int i=(a);i<(b);++i)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);--i)
#define REP(i,n) for (int i=0;i<(n);++i)
#define RREP(i,n) for (int i=(n)-1;i>=0;--i)

void YES() { cout << "YES\n"; }
void NO() { cout << "NO\n"; }
void Yes() { cout << "Yes\n"; }
void No() { cout << "No\n"; }
void yes() { cout << "yes" << endl; }
void no() { cout << "no" << endl; }

template<class T>
T fibonacci(T n) {
	T first = 1, second = 1, ans = 0;
	for (int i = 0; i < n; ++i) {
		if (i > 0) {
			ans += first;
		}
		if (i > 1) {
			ans += second;
			first = second;
			second = ans;
		}
	}
	return ans;
}

int main() {
	cout << fibonacci(3) << endl;

	return 0;
}

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

using namespace std;

typedef long long ll;

ll fib(int n) {
    vector<ll> memo(n + 1, 0);
    for (int i = 0; i < n + 1; i++) {
        if (i == 0 || i == 1) {
            memo[i] = 1;
        }
        else {
            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 <vector>
using namespace  std;

void fnInput(vector<int>& rvnFibDP)
{
  int nMaxSiz;
  cin >> nMaxSiz;
  rvnFibDP.resize(nMaxSiz + 1, 0);

  if (nMaxSiz >= 2)     rvnFibDP[0] = rvnFibDP[1] = 1;
  else if (nMaxSiz = 1) rvnFibDP[0] = 1;
  else;
}

int fnFibNumber(vector<int>& rvnFibDP, int nNo)
{
  if (rvnFibDP[nNo])  return rvnFibDP[nNo];

  return rvnFibDP[nNo] = 
         fnFibNumber(rvnFibDP, nNo - 1) + fnFibNumber(rvnFibDP, nNo - 2);
}

int main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  vector<int> vnFibDP; 

  fnInput(vnFibDP);
  cout << fnFibNumber(vnFibDP, vnFibDP.size() - 1) << endl;
  return 0;
}

C++: #include<iostream>

using namespace std;

int main () {

    int n, F[45], i;

    cin >> n;

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

    for (i = 2; i <= n; i++) {

        F[i] = F[i - 1] + F[i - 2];

    }

    cout << F[n] << endl;

    return 0;

}