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 <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1001001001;
const int MOD = 1000000007;

template <typename T>
void print(const T &v);

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

// Use For Debug
template <typename T>
void print(T const &v)
{
    for (int i = 0; i < v.size(); i++)
    {
        if (i)
            cout << ' ';
        cout << v[i];
    }
    cout << endl;
}

C++: #include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define rrep(ri,n) for(int ri = (int)(n-1); ri >= 0; ri--)
#define rep2(i,x,n) for(int i = (int)(x); i < (int)(n); i++)
#define repit(itr,x) for(auto itr = x.begin(); itr != x.end(); itr++)
#define rrepit(ritr,x) for(auto ritr = x.rbegin(); ritr != x.rend(); ritr++)
#define ALL(n) begin(n), end(n)
using ll = long long;
using namespace std;

int fib(int n){
  static vector<int> dp(45, -1);
  if(dp.at(n) != -1) return dp.at(n);
  if(n == 0 || n == 1) return dp.at(n) = 1;
  else return dp.at(n) = fib(n-1) + fib(n-2);
}

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

C++: #include <stdio.h>

int dp[50];

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,i;
	for(i=0;i<50;i++) dp[i]=-1;
	
	scanf("%d",&n);
	
	printf("%d\n",fib(n));
	
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define ll long long 
#define rep(i,n) for(ll i=0;i<n;i++)
#define inf 999999999
const int mod = 1000000007;
ll cnt = 0;


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

}

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


int main(){
	int n;
	scanf("%d", &n);
	int prev = 1;
	int prevprev = 1;
	int val;
	if (n == 0 || n == 1){
		val = 1;
	}
	else{
		for (int i = 1; i < n; i++){
			val = prev + prevprev;
			prevprev = prev;
			prev = val;
		}
	}
	printf("%d\n", val);

	return 0;
}

C++: #include<iostream>
using namespace std;
int dp[50];
int fibonacci(int x){
  if(x==0 || x==1) return 1;
  if(dp[x]!=0) return dp[x];
  return dp[x]=fibonacci(x-1)+fibonacci(x-2);
}
int main(){
  int n;
  cin>>n;
  cout<<fibonacci(n)<<endl;
  return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
#include<map>
#include<stack>
#include<queue>
#include<list>
using namespace std;
int inf = 1000000000;

int main(void) {

  int n;
  cin >> n;
  vector<int> f(n+1);
  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;

  return 0;
}

// EOF

C++: #include <stdio.h>

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

C++: #include <iostream>

int main()
{
	int n; std::cin >> n;
	
	long long int* DP = new long long int[n+1];
	DP[0] = DP[1] = 1;
	for (int i=2; i<=n; i++) DP[i] = DP[i-1] + DP[i-2];
	
	std::cout << DP[n] << std::endl;
	
	delete[] DP;
	
	return 0;
}

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

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

C++: #include <algorithm>
#include <cassert>
#include <climits>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <string>
#include <vector>

#define all(x) begin(x), end(x)

using namespace std;

template <typename T> T gcd(T a, T b) {
  if (a % b == 0) {
    return b;
  } else {
    return gcd(b, a % b);
  }
}

template <typename T> T lcm(T a, T b) { return a * b / gcd(a, b); }

int dp[45] = {0};
int fib(int n) {
    if (n == 0 || n == 1) {
        return 1;
    }
    if (dp[n-1] != 0) {
        if (dp[n-2] != 0) {
            return dp[n-1] + dp[n-2];
        }
    }
    dp[n-1] = fib(n-1);
    dp[n-2] = fib(n-2);
    return dp[n-1] + dp[n-2];
}

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