#include using namespace std; using ll = long long; using ld = long double; #define rep(i, r) for(int i = 0; i < (r); ++i) #define reps(i, s, r) for(int i = (s); i < (r); ++i) #define fore(i, m2) for(auto &i : m2) #define vi vector #define vl vector #define pl pair #define all(i) (i).begin(), (i).end() #define fs first #define sc second template bool chmin(T &i, T b) { if(i > b) { i = b; return true; } return false; } template bool chmax(T &a, T b) { if(a < b) { a = b; return true; } return false; } const ll INF = LONG_LONG_MAX / 3; const ll MOD = 1'000'000'007; const ll MAX = 1e6 + 5; int main() { ll n; cin >> n; ll a = 1, b = 0, c = 0, ta, tb, tc; while(n--) { ta = a, tb = b, tc = c; a = (tb + tc) % MOD; b = ta; c = tb; } cout << ((a + b) % MOD + c) % MOD << endl; }