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

using ll=long long; 

void solve(){
	vector<ll> a(100);
	int n;
	cin>>n;
	a[0]=2;
	a[1]=1;
	for(int i=2; i<100; i++){
		a[i]=a[i-1]+a[i-2];
	}
	cout<<a[n]<<endl;
}

signed main(){
	//while(1)
	solve();
}