#include #include #include #include #include #include #include #include #include #include #include #include #include #define repd(i,a,b) for (int i=(a);i<(b);i++) #define rep(i,n) repd(i,0,n) #define var auto #define mod 1000000007 #define inf 2147483647 #define nil -1 typedef long long ll; using namespace std; inline int input(){ int a; cin >> a; return a; } template inline void output(T a, int p) { if(p){ cout << fixed << setprecision(p) << a << "\n"; } else{ cout << a << "\n"; } } // end of template int main() { cin.tie(0); // source code int N = input(); vector state(3, 0); vector state_tmp(3); state[0] = 1; repd(i, 1, N){ state_tmp[0] = state[2]; state_tmp[1] = state[0]; state_tmp[2] = (state[0] + state[1]) % mod; state = state_tmp; } int ret = 0; rep(i, 3){ ret += state[i]; ret %= mod; } output(ret, 0); return 0; }