#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma G++ optimize("O3")
using namespace std;
const double PI = acos(-1.0);
const int MAXN = 1e6 + 55;
const int INF = 0x3f3f3f3f;
const int NINF = 0x80808080;
const long long NLINF = 0x8080808080808080;
const long long LINF = 1e9;
const long long mo = 1e9 + 7;
const double eps = 1e-6;
int n;
long long ff[MAXN];
long long dp[MAXN];
void init() {
  ff[1] = 1, ff[2] = 2;
  dp[1] = 1, dp[2] = 3;
  for (int i = 3; i <= 1e6; i++) {
    ff[i] = (ff[i - 1] + ff[i - 2]) % mo;
    dp[i] = (dp[i - 1] + ff[i]) % mo;
  }
}
int main() {
  init();
  scanf("%d", &n);
  printf("%lld\n", dp[n]);
}
