#include <iostream>
#include <vector>
#include <cstdio>
#include <string>
#include <cmath>
using namespace std;
long long int aaa(int n,long long int *c){

	if(n==0)
		return 1;
	else if(n<0)
		return 0;
	else{
	if(c[n]==0)
		c[n]=aaa(n-1,c)+aaa(n-2,c)+1;
		return c[n];
	}
}

int main(){
	
	int n;
	long long int c[10000]={0};
	while(cin>>n){
		
		cout<<aaa(n,c)<<endl;
	
}
}