Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

// I/O
type Scanner struct {
	sc *bufio.Scanner
}

func NewScanner() *Scanner {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 1024), int(1e+9))
	return &Scanner{sc}
}

func (s *Scanner) nextStr() string {
	s.sc.Scan()
	return s.sc.Text()
}

func (s *Scanner) nextInt() int {
	i, e := strconv.Atoi(s.nextStr())
	if e != nil {
		panic(e)
	}
	return i
}

func (s *Scanner) nextFloat() float64 {
	f, e := strconv.ParseFloat(s.nextStr(), 64)
	if e != nil {
		panic(e)
	}
	return f
}

func (s *Scanner) nextRuneSlice() []rune {
	return []rune(s.nextStr())
}

func (s *Scanner) nextIntSlice(n int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = s.nextInt()
	}
	return res
}

func (s *Scanner) nextFloatSlice(n int) []float64 {
	res := make([]float64, n)
	for i := 0; i < n; i++ {
		res[i] = s.nextFloat()
	}
	return res
}

// Arithmetic
func max(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m < i {
			m = i
		}
	}
	return m
}

func min(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m > i {
			m = i
		}
	}
	return m
}

func abs(x int) int {
	if x > 0 {
		return x
	}
	return -x
}

func pow(x, y int) int {
	res := 1
	for i := 0; i < y; i++ {
		res *= x
	}
	return res
}

func ceil(a, b int) int {
	if a%b == 0 {
		return a / b
	} else {
		return a/b + 1
	}
}

// Sort
type RuneSlice []rune

func (a RuneSlice) Len() int           { return len(a) }
func (a RuneSlice) Less(i, j int) bool { return a[i] < a[j] }
func (a RuneSlice) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }

// Main
func main() {
	sc := NewScanner()
	wtr := bufio.NewWriter(os.Stdout)
	N := sc.nextInt()
	dp := make([]int, N+1)
	dp[0] = 1
	dp[1] = 1
	for i := 2; i <= N; i++ {
		dp[i] = dp[i-1] + dp[i-2]
	}

	fmt.Fprintln(wtr, dp[N])
	wtr.Flush()
}

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

typedef vector<vector<ll> > mat;

//行列累乗
// mat は vector<vectorのこと

// A*B　の　計算
mat mul( mat &A, mat &B){
 mat  C(A.size(), vector<ll>(B[0].size()));
 for(ll i = 0; i < A.size(); i++){
   for(ll k = 0; k < B.size(); k++){
     for(ll j = 0; j < B[0].size();j++){
       C[i][j] = (C[i][j]+A[i][k]*B[k][j]);
     }
   }
 }
return C;
}

// A^nの計算

mat pow(mat A, ll n){
  mat B(A.size(), vector<ll>(A.size()));
  
  for(int i = 0; i < A.size(); i++){
    B[i][i] = 1;}
 
  while( n > 0){
    if( n & 1){  
      B = mul(B,A);}
      A = mul(A,A);
      n >>= 1;
    }
    
    return B;
  }
  
  ll N;
  
int main(){
  cin >> N;
 
  mat A(2,vector<ll>(2));
  A[0][0] = 1LL; A[0][1] = 1LL; A[1][0] = 1LL; A[1][1] = 0LL;
  cout << pow(A,N+1)[1][0] << endl; return 0;}

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

int main()
{
  int n;
  cin >> n;
  int dp[n+1];
  dp[0] = 1;
  dp[1] = 1;
  for(int i=2;i <= n;i++){
      dp[i] = dp[i-1]+dp[i-2];
  }
  
  printf("%d\n",dp[n]);
  return 0;
}

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

int main()
{
	int n,x1=1,x2=1,tmp;
	cin >> n;
	
	if(n==0||n==1) cout << "1";
	else{
		for(;n>2;n--){
			tmp=x1+x2;
			x1=x2;
			x2=tmp;
		}
		cout << x1 + x2 << endl;
	}
	
	return 0;
	
}

C++: #include <iostream>
#include <sstream>
#include <cstdio>
#include <stdlib.h>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int f[45];
int fib(int n){
  if(n==1||n==0)return 1;
  if(f[n]!=0)return f[n];
  else return fib(n-1)+fib(n-2);
}
int main(){
  int  n;
  cin>>n;
  cout<<fib(n)<<endl;



  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
main(){
  int a[44],n;
  a[0]=a[1]=1;
  cin>>n;
  for(int i=2;i<=n;i++)a[i]=a[i-1]+a[i-2];
  cout<<a[n]<<endl; 
}

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


int main()
{
    int n;
    cin >> n;
    int f1 = 1, f2 = 1;
    int temp;
    if(n == 0 && n == 1){
        cout << 1 << endl;
        return 0;
    }
    for(int i = 0; i < n - 1; i++){
        temp = f2;
        f2 = f1 + f2;
        f1 = temp;
    }
    cout << f2 << endl;
    
    return 0;
}

C++: #include<iostream>

using namespace std;

int main(){

  int n;

  int n1,n2,st;
  //initialize
  n1=1;
  n2=1;
  st=1;
  //load number
  cin >>n;
  //fibonacci
  for(int i=1;i<n;i++){
    st=n1+n2;
    n1=n2;
    n2=st;
  }
  //print
  cout <<st<<endl;
  return 0;
}

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

int main() {
    int n; cin >> n;
    long long a = 0, b = 1;
    while (n--) {
        long long c = a + b;
        a = b;
        b = c;
    }
    cout << b << endl;
}

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

signed main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  int n; cin >> n;
  vector<int> dp(n+1,1);
  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 fib(int n){
  switch(n){
  case 0:
    return 1;
  case 1:
    return 1;
  default:
    return fib(n-1) + fib(n-2);
  }
}

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

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

int fib[50];

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

C++: #include <iostream>
#include <cstdio>

using namespace std;

long long fib[45];

int main(void) {

    fib[0] = fib[1] = 1;
    for (int i = 2; i < 45; ++i) {
        fib[i] = fib[i - 1] + fib[i - 2];
    }

    int n;
    cin >> n;
    printf("%lld\n", fib[n]);

    return 0;
}

C++: #include<iostream>

using namespace std;
int fib(int n);
int main() {
  int n;

  //入力
  cin >> n;

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

  return 0;
}

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

C++: #include <stdio.h>
#include <stdlib.h>
#define N 45
 
int f[N];
int fib(int);

int main(){
  int n,i;
  
  scanf("%d",&n);
  printf("%d\n",fib(n));
  return 0;
}
 
int fib(int n){
  if(n==0 || n==1) return f[n]=1;
  if(f[n]!=NULL) return f[n];
  return f[n]=fib(n-2)+fib(n-1);
}

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

#define ll long long
#define vvi vector<vector<int>>
#define vec vector
#define pq priority_queue
#define all(v) (v).begin(), (v).end()
#define uniqueV(x) sort(x.begin(), x.end()); x.erase(unique(x.begin(), x.end()), x.end());
#define rep(i, n) for (int (i) = (0); (i) < (n); ++(i))
#define repp(i, m, n) for (int (i) = (m); (i) < (n); ++(i))
#define debug(x) cerr << #x << ": " << x << endl;
#define debug2(x, y) cerr<<"("<<#x<<", "<<#y<<") = "<<"("<<x<<", "<<y<<")"<<endl;
#define debug3(x, y, z) cerr<<"("<<#x<<", "<<#y<<", "<<#z<<") = "<<"("<<x<<", "<<y<<", "<<z<<")"<<endl;
#define debugB(value, size) cerr<<#value<<": "<<bitset<size>(value) << endl;
#define line() cerr << "---------------" << endl;

const int dx[] = {1, -1, 0, 0};
const int dy[] = {0, 0, -1, 1};
const double PI = 3.14159265358979323846;

template<typename T>
void printA(vector<T> &printArray, char between = ' ') {
   int paSize = printArray.size();
   for (int i = 0; i < paSize; i++) { cerr << printArray[i] << between;}
   if (between != '\n') {cerr << endl;}
}

// ------------------------------------------------------------------------------------------

int fib[100];

ll f(int n) {
   if (n == 1 || n == 2) return fib[n] = 1;
   if (fib[n]) return fib[n];
   return fib[n] = f(n-1) + f(n-2);
}

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

   return 0;
}