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>
using namespace std;

int main(int argc, char const *argv[])
{
    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++: #include <bits/stdc++.h>
using namespace std;
#define MAX 44
int fibonacci(int);
int F[MAX];

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

int fibonacci(int n){
  if(n == 0 || n == 1){
    return F[n] = 1;
  }
  return F[n] = fibonacci(n-2) + fibonacci(n-1);
}

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==1){
    return 1;
  }else if(n==0){
    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;

typedef long long ll;
typedef pair<ll, ll> P;

#define pb push_back
#define rep(i, n) for(int i = 0; i < (n); i++)
#define FOR(i, a, n) for(int i = a; i < (n); i++)
#define mod (ll)(1e9+7)
#define int ll

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}

signed main() {
	ll n, f[50];
  cin >> n;
  f[0] = f[1] = 1;
  for(int i = 2; i <= n; i++) f[i] = f[n - 1] + f[n - 2];

  cout << f[n] << endl;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define int long long
int memo[50];
int fib(int n){
  if(~memo[n]) return memo[n];
  if(n<=1) return 1;
  return memo[n]=(fib(n-1)+fib(n-2));
}
signed main(){
  int n;
  cin>>n;
  memset(memo,-1,sizeof(memo));
  cout<<fib(n)<<endl;
  return 0;
}

C++: #include <iostream>
#define NIL -1
using namespace std;
int f[45] = {};

int fib(int n){
  if(n == 0 || n == 1){
    //cout << "a;n = " << n << " " << "f[n] = " << f[n] << endl;
    return f[n] = 1;
  }
  if(f[n] != NIL){
    //cout << "b;n = " << n << " " << "f[n] = " << f[n] << endl;
    return f[n];
  }
  //cout << "c;n = " << n << " " << "f[n] = " << f[n] << endl;
  return f[n] = fib(n - 1) + fib(n - 2);
}

int main(){

  int n;
  cin >> n;

  for(int i = 0;i < 45;i++) f[i] = NIL;

  cout << fib(n) << endl;

}

C++: #include<iostream>

using namespace std;

int main() {
    int n;
    int F[50];

    cin >> n;

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

    for (int i = 2; i <= n; i++)
        F[i] = F[i - 2] + F[i - 1];

    cout << F[n] << endl;

    return 0;
}

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

using namespace std;

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

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1e18;
const ll mod = 1000000007;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
template<class T> inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template<class T> inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int ctoi(char c) {
  if (c >= '0' && c <= '9') {
    return c - '0';
  }
  return 0;
}
ll factorial(ll n) {
  if (n == 1) {
    return 1;
  }
  ll ans = factorial(n-1);
  return ans*n;
}
ll gcd(ll a, ll b) {
  if (a < b) {
    ll tmp = a;
    a = b;
    b = tmp;
  }
  ll r = a%b;
  while(r != 0) {
    a = b;
    b = r;
    r = a%b;
  }
  return b;
}
ll lcm(ll a, ll b) {
  return (a/gcd(a, b))*b;
}

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

ll fib(ll n) {
  if (n==0 || n==1) {
    dp.at(n) = 1;
    return dp.at(n);
  }
  if (dp.at(n) != -1) {
    return dp.at(n);
  }
  dp.at(n) = fib(n-1) + fib(n-2);
  return dp.at(n);
}

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

C++: #include <iostream>

using namespace std;

int temp_data[50];

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

int main() {
	for (int i = 0; i < 50; i++) temp_data[i] = -1;

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

	return 0;
}

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

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<stdio.h>
#include<cstring>
#include<math.h>
#include<map>
#include<bitset>
#include<iomanip>
#include<queue>
using namespace std;

#define rep(i, n) for (int i = 0; i < (int)(n); ++i)

int main() {
  int fib[44];
  int n;
  cin >> n;
  rep(i, n+1) {
    if(i == 0 || i == 1) {
      fib[i] = 1;
      continue;
    }
    fib[i] = fib[i-1] + fib[i-2];
  }
  cout << fib[n] << endl;
  return 0;
}

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

using namespace std;

#define FOR(i,s,e) for((i)=(s);(i)<(int)(e);(i)++)
#define REP(i,e) FOR(i,0,e)

#define all(o) (o).begin(), (o).end()
#define psb(x) push_back(x)
#define mp(x,y) make_pair((x),(y))

typedef long long ll;
typedef pair<int, int> PII;

const double EPS = 1e-10;

const int M = 2;
int a[M][M], b[M][M], w[M][M];
int n;

void multiple_mat_ab_b() {
  int i, j, k;
  memset(w, 0, sizeof(w));
  for (i=0; i<M; i++)
    for (j=0; j<M; j++)
      for (k=0; k<M; k++)
        w[i][j] += a[i][k]*b[k][j];

  for (i=0; i<M; i++)
    for (j=0; j<M; j++)
        b[i][j] = w[i][j];
}

void multiple_mat_aa_a() {
  int i, j, k;
  memset(w, 0, sizeof(w));
  for (i=0; i<M; i++)
    for (j=0; j<M; j++)
      for (k=0; k<M; k++)
        w[i][j] += a[i][k]*a[k][j];

  for (i=0; i<M; i++)
    for (j=0; j<M; j++)
        a[i][j] = w[i][j];
}

void pow_mat_a(int k) {
  a[0][0] = a[0][1] = a[1][0] = 1;
  a[1][1] = 0;

  b[0][0] = b[1][1] = 1;
  b[0][1] = b[1][0] = 0;

  //?????´???a???k????????????
  for (int i=0; i<k; i++)
    multiple_mat_ab_b();

}

int main() {
  scanf("%d ", &n);
  pow_mat_a(n);
  printf("%d\n", b[1][0]+b[1][1]);

	return 0;
}