#include <iostream> #include <iomanip> #include <vector> #include <algorithm> #include <numeric> #include <functional> #include <cmath> #include <queue> #include <stack> #include <set> #include <map> #include <sstream> #include <string> #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 <typename T> 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<int> state(3, 0); vector<int> 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; }