#include<cstdio>
#include<algorithm>
#include<cmath>
#include<iostream>
using namespace std;
long long dp[55]={1};
long long S[55]={0};
int  N;
int main(void){
	cin>>N;
	if(N<=3){cout<<N<<endl;}
	else{
		dp[2]=1;
		dp[3]=1;
		S[3]=3;
		for(int i=4;i<=N;i++){
			dp[i]=dp[i-1]+dp[i-2];
			S[i]=S[i-1]+dp[i];
		}
		cout<<S[N]<<endl;
	}
	return 0;
}