#include "bits/stdc++.h" using namespace std; #define print(x) cout< PI; typedef pair V; typedef vector VE; const ll mod = 1000000007; int main() { int n; cin>>n; int a=1,b=0,c=0; int ta,tb,tc; while(n--){ ta=a,tb=b,tc=c; a=(tb+tc)%mod; b=ta; c=tb; } print(((a+b)%mod+c)%mod); }