#include <bits/stdc++.h>
long long f[1111111], n;
int main() {
  f[1] = 1;
  f[2] = 3;
  for (int i = 3; i <= 1000000; i++)
    f[i] = 1LL * (f[i - 1] + f[i - 2] + 2LL) % 1000000007;
  while (scanf("%I64d", &n) != EOF) printf("%I64d\n", f[n]);
  return 0;
}
