#include<bits/stdc++.h>
#define ll long long int

#define print(a)        for (auto x : a) cout << x << " "; cout << endl
#define print_upto(a,n)        for(int i=0;i<n;i++)    cout<<a[i]<<" "; cout<<endl
#define take(x,n)           for(int i=0;i<n;i++)  cin>>x[i];

#define watch(x) cout << (#x) << " is " << (x) << "\n"
#define watch2(x,y) cout <<(#x)<<" is "<<(x)<<" and "<<(#y)<<" is "<<(y)<<"\n"

using namespace std;

ll n;
map<ll, ll> mp;

ll func(ll n) {
	if (n == 1 || n == 2)
		return n;

	if (mp[n] != 0)
		return mp[n];

	return mp[n] = func(n - 1) + func(n - 2);
}

int main() {

	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);

// #ifndef ONLINE_JUDGE
// 	freopen("input.txt", "r", stdin);
// 	freopen("output.txt", "w", stdout);
// 	freopen("error.txt" , "w" , stderr);
// #endif

	cin >> n;

	mp[0] = 1;
	mp[1] = 1;
	mp[2] = 1;

	ll ans = func(n);
	cout << ans << "\n";

	return 0;
}