#include <iostream>
#include <vector>
#include <cstdio>
#include <string>
#include <cmath>
using namespace std;
int aaa(int n){
	if(n==0)
		return 1;
	else if(n<0)
		return 0;
	else
	return aaa(n-1)+aaa(n-2)+1;
}

int main(){
	
	int n;
	
	while(cin>>n){
		cout<<aaa(n)<<endl;
	
}
}