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