#include <bits/stdc++.h>
using namespace std;
const int N = 1e6;
const int mod = 1e9 + 7;
inline int add(int a, int b) {
  int ret = a + b;
  if (ret >= mod) ret -= mod;
  return ret;
}
inline int mult(int a, int b) { return (int)((long long)a * b % mod); }
inline int sub(int a, int b) {
  int ret = a - b;
  if (ret < 0) ret += mod;
  return ret;
}
int n;
int pot(int x, int y) {
  int ret = 1;
  int b = x;
  while (y) {
    if (y & 1) ret = mult(ret, b);
    b = mult(b, b);
    y >>= 1;
  }
  return ret;
}
int fak[2 * N + 2], inverz[2 * N + 2];
int maxi = 0;
int povrh(int n, int k) {
  maxi = max(maxi, k);
  if (k > n) return 0;
  return mult(fak[n], mult(inverz[k], inverz[n - k]));
}
int vert[2 * N + 2];
int main() {
  scanf("%d", &n);
  fak[0] = 1;
  inverz[0] = 1;
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    fak[i] = mult(fak[i - 1], i);
    inverz[i] = pot(fak[i], mod - 2);
    ans = add(ans, pot(2, i));
    vert[i] = pot(2, i);
  }
  fak[n + 1] = mult(fak[n], n + 1);
  inverz[n + 1] = pot(fak[n + 1], mod - 2);
  vert[n + 1] = sub(mult(2, vert[n]), mult(2, povrh(n, n)));
  ans = add(ans, vert[n + 1]);
  for (int i = n + 2; i <= 2 * n; i++) {
    fak[i] = mult(fak[i - 1], i);
    vert[i] = sub(mult(2, vert[i - 1]), mult(2, povrh(i - 1, n)));
    ans = add(ans, vert[i]);
  }
  printf("%d\n", add(1, ans));
  return 0;
}
