#include using namespace std; const int mod = 1e9 + 7; int N; int ken = 1, kenken, pa; int main(void) { cin >> N; for (int i = 0; i < N - 1; ++i) { int _ken = ken, _kenken = kenken, _pa = pa; ken = _pa % mod; kenken = _ken % mod; pa = (_ken + _kenken) % mod; } cout << (ken + kenken + pa) % mod << endl; return 0; }