#include <bits/stdc++.h>
using namespace std;
int dp[1000006];
int main() {
  long long n;
  int i, j, k, l;
  dp[1] = 1;
  dp[2] = 3;
  for (int i = 3; i <= 1000000; i++) {
    dp[i] = (dp[i - 1] + dp[i - 2] + 2) % 1000000007;
  }
  while (~scanf("%d", &n)) {
    cout << dp[n] << endl;
  }
}
