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> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <stdlib.h>
#include <stdio.h>

using namespace std;

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }

int abs_A(int num) {
    if (num > 0)
        return num;
    else
        return -num;
}

int abs_B(long long num, long long numb) {
    if (num - numb >= 0)
        return num - numb;
    else
        return -1 * (num - numb);
}

long long gcd(long long a, long long b) {
    if (b == 0) return a;
    else return gcd(b, a % b);
}

long long lcm(long long a, long long b) {
    return a * b / gcd(a, b);
}

bool permutation(vector<int>& vec,vector<int>& P) {
    bool ok = true;
    for (int i = 0; i < vec.size(); i++) {
        //cout << vec.at(i);
        if (vec.at(i) != P.at(i)) {
            ok = false;
        }
    }
    return ok;
}

/*bool nibu(vector<int>& retu,int key) {
    
}*/

const long long MOD = 1000000007;
const int INF = 1001001001;

int main() {
    int N;
    cin >> N;
    vector<int> fib(45);
    fib.at(0) = 1;
    fib.at(1) = 1;
    for (int i = 2; i <= N; i++) {
        fib.at(i) = fib.at(i - 1) + fib.at(i - 2);
    }
    cout << fib.at(N) << endl;
}

C++: #include <iostream>

using namespace std;


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

}

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

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

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

    vector<int> dp(n + 1);
    dp[0] = 1; dp[1] = 1;
    for (auto i = 2; i <= n; i++) dp[i] = dp[i - 1] + dp[i - 2];

    cout << dp[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++: #icnlude <iostream>

using namespace std;

int fib(int n);

int memo[45];

int main(){
  int n;

  cin >> n;
  cout << fib(n) << endl;
}

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

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

using namespace std;

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

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

C++: #include<cstdio>

const int MAX_V = 44;
int fib_array[MAX_V]{0};
void make_fib_array(){
  fib_array[0]=1;
  fib_array[1]=1;
  for(int i=2;i<MAX_V;i++)
    fib_array[i]=fib_array[i-1]+fib_array[i-2];
}
int main(){
  make_fib_array();
  int n; scanf("%d",&n);
  printf("%d\n",fib_array[n]);
}

C++: #include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <bitset>
#include <climits>
#define REP(i,n) for (int i=0;i<(n);i++)
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define RFOR(i,a,b) for (int i=(a)-1;i>=(b);i--)
#define ll long long
#define ull unsigned long long
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
const int INF = 1e9;
const int MOD = 1e9 + 7;

using namespace std;
int f[50];
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
	int n;cin>>n;
	f[0]=f[1]=1;
	REP(i,n-1){
		f[i+2] = f[i + 1] + f[i];
	}
	cout << f[n] << endl;
  return 0;
}

C++: #include <stdio.h>
int main()
{
    int x;
    int f[100];
    f[0]=f[1]=1;
    scanf("%d",&x);
    for(int i=2;i<=x;i++){
      f[i]=f[i-1]+f[i-2];
    }
    printf("%d",f[x]);
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <cmath>
#include <cstring>

#define LP(i,n) for(int i=0;i<n;i++)
#define Mset(x,v) memset(x,v,sizeof(x))

using namespace std;
using LL=long long;

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

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

vector<int> dp(50,-1);

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;
    scanf("%d", &n);
    printf("%d\n", fib(n));
}

C++: #include <iostream>

using namespace std;

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

C++: #include <sstream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <iostream>
#include <utility>
#include <set>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
using namespace std;
typedef long long ll;
ll fib[50];
ll dfs(int n) {
    if (fib[n] > 0) return fib[n];
    if (n == 0 || n == 1) return 1;
    return fib[n] = dfs(n-1) + dfs(n-2);
}
int main(void) {
    int n;
    cin >> n;
    cout << dfs(n) << endl;
    return 0;
}