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

int main(){
	cin.tie(0),ios::sync_with_stdio(false);
	int n; cin>>n;
	int64_t k1=1,k2=0,p=0;
	for(int i=1;i<n;++i){
		int64_t tk1=k1,tk2=k2,tp=p;
		k1=tp%mod,k2=tk1%mod,p=tk1+tk2%mod;
	}
	cout<<(k1+k2+p)%mod<<"\n"s;
}