#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
long long mod = 1e9 + 7;
long long dp[1000003];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  fill(dp + 1, dp + 1000003, 1);
  long long n, i, ans = 1;
  cin >> n;
  for (i = 2; i <= n; ++i)
    dp[i] = (dp[i] + dp[i - 1] + max(dp[i - 2] - 1, 0ll)) % mod,
    ans = (ans + dp[i]) % mod;
  cout << ans;
  return 0;
}
