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<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 (num == 0 || num == 1) {
    return A[num];
  } else {
    return fib(num-1)+fib(num-2);
  }
}

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

C++: #include<iostream>

using namespace std;
int fib(int n);

int memo[45];
int main(){
  int n;
  cin >> n;
  cout << fib(n) << endl;
  retrun 0;
}

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 <iostream>
#include <cstdio>
using namespace std;

const int Max = 45;

int FibArray[Max];

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

int main(){
    int index;
    scanf("%d", &index);

    printf("%d\n", fib(index));
    return 0;
}

C++: #include <iostream>

using namespace std;

int fib(int n);

int main() {
int n;
int dfep[45];

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

cin >> n;

for(int 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(void){

	int n;

	cin >> n;

	int f[44];
	f[0] = 1; f[1] = 1;

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

	cout << f[n] << endl;

}

C++: #include <iostream>

using namespace std;

#define INF -1

int dp[45];

int main()
{
	for(int i = 0; i < 45; i++) { dp[i] = INF; }

	int n;

	cin >> n;

	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;

	getchar();
	getchar();
	return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
int A[50];
int fib(int n){
	if(A[n]) return A[n];
	else if(n==1 || n==0) A[n]=1;
	else A[n]=fib(n-1)+fib(n-2);
	return A[n];
}

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

C++: #include <bits/stdc++.h>
using namespace std;
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
#define P(x) cout << (x) << endl
#define p(x) cout << (x)
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define vv(type, c, m, n, i) vector<vector<type>> c(m, vector<type>(n, i));
#define rep(i,a,n) for(int i=(a), i##_len=(n); i<i##_len; ++i)
#define rrep(i,a,n) for(int i=(a), i##_len=(n); i>i##_len; --i)
#define len(x) ((int)(x).size())
#define mp make_pair
#define eb emplace_back
typedef long long ll;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<long long> vll;
typedef vector<string> vs;
typedef vector<bool> vb;
int main() {
	int n; cin >> n;
	vi v(50, 0);
	v[0] = v[1] = 1;
	rep(i, 2, n + 1) {
		v[i] = v[i - 2] + v[i - 1];
	}
	P(v[n]);
	return 0;
}

C++: #include<iostream>
#include<string>
#include <vector>
#include <stack>
#include <queue>
#include <list>
#include <algorithm>
#include <cstdlib>
using namespace std;
int ctoi(char c) {
	switch (c) {
	case '0': return 0;
	case '1': return 1;
	case '2': return 2;
	case '3': return 3;
	case '4': return 4;
	case '5': return 5;
	case '6': return 6;
	case '7': return 7;
	case '8': return 8;
	case '9': return 9;
	default: return 0;
	}
}

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

C++: #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for(ll i = 0; i < (n); ++i)
#define FOR(i, m, n) for(ll i = m; i < (n); i++)
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
using vi = vector<int>;
using vii = vector<vi>;
using pii = pair<int, int>; 
using vl = vector<ll>;
using vll = vector<vl>;
using pll = pair<ll, ll>;

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

C++: #include"iostream"
using namespace std;
int main()
{
  int a,b,c;
  int n;
  cin>>n;
  c=1;
  a=1;b=1;
  for(int i=1;i<n;i++)
    {
      c=a+b;
      a=b;
      b=c;
    }
  cout<<c<<endl;
  return 0;
}

C++: #include <iostream>
using namespace std;
 
int main() {
	int fib[45]={1,1},i;
for(i=2;i<=44;i++){
fib[i]=fib[i-1]+fib[i-2];
}
	return 0;
}

C++: #include<iostream>

using namespace std;

int main(){

  int n;

  int n1,n2,st;

  n1=1;
  n2=1;
  st=1;

  cin >>n;

  for(int i=1;i<=n;i++){
    st=n1+n1;
    n1=n2;
    n2=st;
  }
  cout <<st<<endl;

}

C++: #include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit atof atoi 
#include <cstdio>		// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>		// require fabs
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>		// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>		// require srand
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()

using namespace std;

int fib[46];

int main()
{
	memset (fib, 0, sizeof (fib ) );
	fib[0] = 1;
	fib[1] = 1;
	for (int i = 2; i < 46; i++ ){
		fib[i] = fib[i-1] + fib[i-2];
	} // end for

	ios_base::sync_with_stdio(0);
	int n; cin >> n;
	printf ("%d\n", fib[n] );
		
	return 0;
}