import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.NoSuchElementException;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class Main {
public static void main
(String[] args
) { InputReader in = new InputReader(inputStream);
OutputWriter out = new OutputWriter(outputStream);
TaskD solver = new TaskD();
solver.solve(1, in, out);
out.close();
}
}
class TaskD {
final static int mod = (int)1e9 + 7;
public void solve(int testNumber, InputReader in, OutputWriter out) {
int n = in.readInt();
int[][] dp = new int[n][];
int[][] sums = new int[n][];
dp[0] = new int[1];
sums[0] = new int[1];
dp[0][0] = 1;
sums[0][0] = 1;
for (int i = 1; i < n; i++) {
dp[i] = new int[i + 1];
sums[i] = new int[i + 1];
if (i % 2 == 0) {
for (int last = 0; last <= i; last++) {
int add = getSum(sums[i - 1], last, i - 1);
dp[i][last] += add;
dp[i][last] %= mod;
}
} else {
for (int last = 0; last <= i; last++) {
int add = getSum(sums[i - 1], 0, last - 1);
dp[i][last] += add;
dp[i][last] %= mod;
}
}
for (int last = 0; last <= i; last++) {
if (last > 0) {
sums[i][last] += sums[i][last - 1];
sums[i][last] %= mod;
}
sums[i][last] += dp[i][last];
sums[i][last] %= mod;
}
}
int ans = 0;
for (int last = 0; last < n; last++) {
ans += dp[n - 1][last];
ans %= mod;
}
out.printLine(ans);
}
private int getSum(int[] sum, int L, int R) {
if (L > R) {
return 0;
}
int res = sum[R];
if (L > 0) {
res -= sum[L - 1];
res += mod;
res %= mod;
}
return res;
}
}
class InputReader {
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
private SpaceCharFilter filter;
this.stream = stream;
}
public int read() {
if (numChars == -1)
throw new InputMismatchException();
if (curChar >= numChars) {
curChar = 0;
try {
numChars = stream.read(buf);
throw new InputMismatchException();
}
if (numChars <= 0)
return -1;
}
return buf[curChar++];
}
public int readInt() {
int c = read();
while (isSpaceChar(c))
c = read();
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
int res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
public boolean isSpaceChar(int c) {
if (filter != null)
return filter.isSpaceChar(c);
return isWhitespace(c);
}
public static boolean isWhitespace(int c) {
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
public interface SpaceCharFilter {
public boolean isSpaceChar(int ch);
}
}
class OutputWriter {
}
public OutputWriter
(Writer writer
) { }
public void close() {
writer.close();
}
public void printLine(int i) {
writer.println(i);
}
}