#ifndef LOCAL #include using namespace std; #define debug(...) (void(0)) #else #include "algo/debug.h" #endif #include using mint = atcoder::modint1000000007; void solve() { int N; cin >> N; mint a{}, b = 1, c{}; for(int i = 1; i < N; i++) { mint nb = a, nc = b, na = b + c; a = na; b = nb; c = nc; } mint ans = a + b + c; cout << ans.val() << endl; } int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); int tt = 1; // std::cin >> tt; while (tt--) { solve(); } }