#include <bits/stdc++.h>
using namespace std;
const long long MaxN = 1E6 + 10;
const long long MOD = 1000 * 1000 * 1000 + 7;
long long dp[MaxN];
int32_t main() {
  long long n;
  cin >> n;
  dp[1] = 1;
  dp[2] = 3;
  for (long long i = 3; i <= n; ++i) {
    dp[i] = dp[i - 1] + dp[i - 2] + 2;
    dp[i] %= MOD;
  }
  cout << dp[n];
}
