Go: package main

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

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

// func main(){
// 	sc := bufio.NewScanner(os.Stdin)
// 	sc.Scan()
// 	n, _ := strconv.Atoi(sc.Text())
// 	fmt.Println(fib(n))
// }

import (
	"fmt"
)

func main(){
	var n, pre1, pre2, now int
	fmt.Scan(&n)
	if n == 0 || n == 1{
		fmt.Println(1)
	} else {
		pre1, pre2 = 1, 1
		for i:=1; i<n; i++{
			now = pre1 + pre2
			pre2 = pre1
			pre1 = now
		}
		fmt.Println(now)
	}

}

C++: #define _GLIBCXX_DEBUG

#include"bits/stdc++.h"
using namespace std;

//loops
#define REP(i,n) for(int i=0;i<(ll)(n);i++)
#define REPD(i,n) for(int i=(ll)(n)-1;i>=0;i--)
#define OneToN(i,n) for(int i=1;i<(ll)(n+1);i++)
#define ZeroToN(i,n) for(int i=0;i<(ll)(n+1);i++)
#define AToB(i,a,b) for(int i=a;i<(ll)(b+1);i++)
#define FOR(i,a,b) for(int i=(a);i<=(b);i++)
#define FORD(i,a,b) for(int i=(a);i>=(b);i--)

//bitsearch
#define BITSEARCH(bit, n) for (int bit = 0; bit < (1<<n); ++bit)
#define isOne(bit, i) bit & (1<<i)


//arrays
#define ALL(x) (x).begin(),(x).end() //sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size()) //sizeをsize_tからllに直しておく
#define add push_back


#define remove_unique(v) v.erase(unique(ALL(v)), v.end())

//pair
#define fir first
#define sec second

//types
#define ll long long
#define vec vector
#define cord2d pair<int,int>
//UNCOMMENT WHEN NEEDED
//#define int ll

//input
template <class T> T get(){ T s; cin >> s; return(s);}
#define gi get<int>()
#define gs get<string>()

template <class T> vector<T> getv(int n) { vec<T> v(n); REP(i, n) cin >> v[i]; return v; }
#define gim(n) getv<int>(n)
#define gsm(n) getv<string>(n)

//output
void print(int a){ cout << a << endl; }
void print(long long a){ cout << a << endl; }
void print(string a){ cout << a << endl; }
void print(char a){ cout << a << endl; }
void print(double a){ cout << a << endl; }
void print(double a, int dig){ cout << std::setprecision(dig) << a << endl; }

template <class T>ostream &operator<<(ostream &o,const vector<T>&v)
{o<<"{";for(int i=0;i<(int)v.size();i++)o<<(i>0?", ":"")<<v[i];o<<"}";return o;}

template <class T = int>
void print(vec<T> v){ cout << v << endl; }

template <class T = int>
void print2dVec(vec<vec<T>> v2d){for(vec<T> v: v2d) {print(v);}}

void YesNo1(bool i = true){ return print(i?"Yes":"No"); }
void YESNO2(bool i = true){ return print(i?"YES":"NO"); }

//debug output
#define var_name(var) #var
template <class T> void debug(T &var, int nest = 0, string before = "") { cout << string("          ", nest) << before; print(var); }

//name replacement
#define y0 y0__
#define y1 y1__
#define j0 j0__
#define j1 j1__

//bool lambdas
#define lamb(exp) [](auto i){return exp;}
#define isEven [](int i){return i % 2 == 0;}
#define isOdd [](int i){return i % 2 != 0;}

//constants
const ll INF = 1e18;
const int MOD = 10000007;

//maths
int factorial(int k){ int sum = 1; for (int i = 1; i <= k; ++i) { sum *= i; } return sum; }
int gcd(int a, int b) {
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

////////////////////

void Main() {
    //code here
    int n = gi;
    vec<int> fib = {};
    REP(i, n+1) {
        if (i == 0 || i == 1) {
            fib.add(1);
        } else {
            fib.add(fib[i-1] + fib[i-2]);
        }
    }
    print(fib[n]);
}

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

C++: #include<iostream>
#include<vector>
using namespace std;
    
int main(){
    int n; cin>>n;
    int f[n+10];
    f[1]=1;
    f[0]=1;
    for(int i=2;i<=n;i++) f[i]=f[i-1] + f[i-2];
    cout<<f[n]<<endl;
    return 0;
}

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

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

int Fib(int n) {

	long a[50] = { 1, 1 };

	if (n > 1) {
		for (int i = 2; i <= n; i++)
			a[i] = a[i - 1] + a[i - 2];
		return a[n];
	}
	else
		return 1;
}

int main()
{
	int n = 0;

	cin >> n;

	for (int i = 0; i <= n; i++)
		cout << Fib(i) << endl;

	return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < n; ++i)
typedef long long ll;
using namespace std;
const int INF = 1e9;

int main() {
    int n;
    cin >> n;

    int a[45] = {0};
    a[0] = a[1] = 1;

    for (int i = 2; i <= n; i++)
        a[i] = a[i - 1] + a[i - 2];
    cout << a[n] << endl;

    return 0;
}

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

#define M_PI       3.14159265358979323846   // pi

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> VI;
typedef pair<ll, ll> P;
typedef tuple<ll, ll, ll> t3;
typedef tuple<ll, ll, ll, ll> t4;
typedef tuple<ll, ll, ll, ll, ll> t5;

#define rep(a,n) for(ll a = 0;a < n;a++)
#define repi(a,b,n) for(ll a = b;a < n;a++)

using namespace std;

static const ll INF = 1e15;

int main() {
	ll n;
	cin >> n;
	vector<ll> dp(n + 1);
	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;
}

C++: #include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <utility>
#include <cmath>
#include <vector>
#include <queue>
#include <set>
#include <map>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
const ll mod = 1000000007;

int main() {
    int n;
    cin >> n;

    if(n == 0) {
        cout << 1 << endl;
        return 0;
    }

    vector<int> dp(n+1);

    dp[0] = dp[1] = 1;
    rep(i, n-1) {
        dp[i+2] = dp[i+1] + dp[i];
    }

    cout << dp[n] << endl;
    return 0;
}