#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, i, m, mx = INT_MIN, mn = INT_MAX, k, c = 0, j, d = 0, t = 0,
                         sm = 0, pdt = 1;
  cin >> n;
  if (i == 1) {
    cout << 1 << endl;
    return;
  }
  vector<long long int> dp(n + 1, 0);
  dp[1] = 1;
  dp[2] = 3;
  long long int od = 1, ev = 3;
  for (i = 3; i <= n; i++) {
    if (i % 2 == 1) {
      dp[i] = (i + ev) % 1000000007;
      od += dp[i] % 1000000007;
    } else {
      dp[i] = (i + od) % 1000000007;
      ev += dp[i] % 1000000007;
    }
  }
  cout << dp[n] % 1000000007 << endl;
  return;
}
int main() {
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
