#include #include "bits/stdc++.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include typedef long long ll; #define rep(i,n) for(ll i=0;i<(ll)(n);i++) using namespace std; typedef pair P; ll kenkenpa[1000001][4]; int main() { int n; cin>>n; kenkenpa[1][1] =1; for(int i=2; i<=n; i++){ kenkenpa[i][0] = (kenkenpa[i-1][1]+kenkenpa[i-1][2])%1000000007; kenkenpa[i][1] = kenkenpa[i-1][0]%1000000007; kenkenpa[i][2] = kenkenpa[i-1][1]%1000000007; } cout<<(kenkenpa[n][0]+kenkenpa[n][1]+kenkenpa[n][2])%1000000007<