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>

using namespace std;

#define int long long
// #define double long double
#define FOR(i, a, b) for(ll i = (a); i < (b); ++i)
#define FORR(i, a, b) for(ll i = (a); i > (b); --i)
#define REP(i, n) for(ll i = 0; i < (n); ++i)
#define REPR(i, n) for(ll i = n; i >= 0; i--)
#define FOREACH(x, a) for(auto &(x) : (a))
#define VECCIN(x)                                                              \
    for(auto &youso_ : (x)) cin >> youso_
#define bitcnt(x) __builtin_popcount(x)
#define lbit(x) __builtin_ffsll(x)
#define rbit(x) __builtin_clzll(x)
#define SZ(x) ((ll)(x).size())
#define fi first
#define se second
#define All(a) (a).begin(), (a).end()
#define rAll(a) (a).rbegin(), (a).rend()
#define PERM(c)                                                                \
    sort(All(c));                                                              \
    for(bool cp = true; cp; cp = next_permutation(All(c)))
#define MKORDER(n)                                                             \
    vector<ll> od(n);                                                          \
    iota(All(od), 0LL);

template <typename T = long long> inline T IN() {
    T x;
    cin >> x;
    return (x);
}
inline void CIN() {}
template <class Head, class... Tail>
inline void CIN(Head &&head, Tail &&... tail) {
    cin >> head;
    CIN(move(tail)...);
}
#define CCIN(...)                                                              \
    char __VA_ARGS__;                                                          \
    CIN(__VA_ARGS__)
#define DCIN(...)                                                              \
    double __VA_ARGS__;                                                        \
    CIN(__VA_ARGS__)
#define LCIN(...)                                                              \
    ll __VA_ARGS__;                                                            \
    CIN(__VA_ARGS__)
#define SCIN(...)                                                              \
    string __VA_ARGS__;                                                        \
    CIN(__VA_ARGS__)
#define Yes(a) cout << (a ? "Yes" : "No") << "\n"
#define YES(a) cout << (a ? "YES" : "NO") << "\n"
#define Printv(v)                                                              \
    {                                                                          \
        FOREACH(x, v) { cout << x << " "; }                                    \
        cout << "\n";                                                          \
    }
template <typename T = string> inline void eputs(T s) {
    cout << s << "\n";
    exit(0);
}
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
    std::fill((T *)array, (T *)(array + N), val);
}

template <typename T> using PQG = priority_queue<T, vector<T>, greater<T>>;
template <typename T> using PQ = priority_queue<T>;

typedef long long ll;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<ll, ll> PL;
typedef vector<PL> VPL;
typedef vector<bool> VB;
typedef vector<double> VD;
typedef vector<string> VS;

const int INF = 1e9;
const int MOD = 1e9 + 7;
// const int MOD = 998244353;
const ll LINF = 1e18;
// const double PI = atan(1.0) * 4.0;
const ll dh[] = {0, 1, 1, 1, 0, -1, -1, -1};
const ll dw[] = {1, 1, 0, -1, -1, -1, 0, 1};
#define PI 3.141592653589793238

template <class T>
std::vector<T> kitamasa(const vector<T> &c, const vector<T> &u,
                        const vector<T> &v) {
    size_t k = c.size();
    std::vector<T> r(2 * k - 1);
    for(int i = 0; i < k; i++)
        for(int j = 0; j < k; j++) r[i + j] += u[i] * v[j];
    for(int i = 2 * k - 2; i >= k; i--)
        for(int j = 0; j < k; j++) r[i - k + j] += r[i] * c[j];
    r.resize(k);
    return r;
}

signed main() {
    LCIN(N);
    VL C = {1, 1};
    VL A = {1, 1};
    ll d = log2(N);
    VVL b(d + 1, VL(2));
    b[0][1] = 1;
    REP(i, d) b[i + 1] = kitamasa(C, b[i], b[i]);
    VL now(N);
    now[0] = 1;
    REP(i, d + 1) {
        if(N >> i & 1) {
            now = kitamasa(C, now, b[i]);
        }
    }
    ll ans = 0;
    REP(i, 2) ans += now[i] * A[i];
    cout << ans << "\n";
}

C++: #include<iostream>

using namespace std;

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

int main(void){

int n;

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

return 0;
}

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

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

C++: #include <bits/stdc++.h>
#define ll long long
ll mod=1000000007;
#define vl vector<ll>
#define pl pair<ll,ll>
#define rep(i,b) for(ll i=0;i<b;i++)
#define all(v) (v).begin(),(v).end()
using namespace std;

ll dp[10000],n;
int main() {
    dp[0]=1;
    dp[1]=1;
    cin>>n;
    rep(i,n){
        dp[i+2]=dp[i]+dp[i+1];
    }
    cout<<dp[n]<<endl;
}

C++: #include<iostream>

using namespace std;

int fib(int n);

int memo[45];

int main() {
  int n;

  //入力
  cin >> n;

  //出力
  cout << fib(n) << endl;

  return 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++: /*
 * C言語のサンプルプログラム - Webkaru
 * - フィボナッチ数の計算 -
 */
#include <stdio.h>
 
int main(void)
{
  /* 変数の宣言 */
  int n;
  int f0, f1, f2;
 
  f0 = 0;
  f1 = 1;
  scanf("%d",&n);
 
  /* フィボナッチ数の計算 */
  while(f1<100000) {
    // フィボナッチ数の計算
    f2 = f1 + f0;
    if(f0==n)printf("%d\n",f2);
    // 変数の代入
    f0 = f1;
    f1 = f2;
  }
 
  return 0;
}

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

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

C++: #include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<sstream>
#include<algorithm>
#include<cmath>
#include<map>
using namespace std;
dp[50];
int main(){
	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;
	return 0;
}