#include <bits/stdc++.h>
using namespace std;
bool cmp(const pair<int, int>& p1, const pair<int, int>& p2) {
  return p1.first < p2.first;
}
int dp[3][4005];
int main() {
  int n;
  scanf("%d", &n);
  dp[1][1] = 1;
  for (int i = 2; i <= n; i++) {
    for (int j = 1; j <= i; j++) {
      int curr;
      if (i % 2 == 0)
        curr = 0;
      else
        curr = 1;
      if (j == 1) {
        dp[curr][j] = dp[curr ^ 1][i - 1] % 1000000007;
        continue;
      }
      dp[curr][j] =
          (dp[curr ^ 1][j - 1] % 1000000007 + dp[curr][j - 1] % 1000000007) %
          1000000007;
    }
  }
  int ans = 0;
  for (int i = 1; i <= n; i++)
    ans = (ans % 1000000007 + dp[n & 1][i] % 1000000007) % 1000000007;
  printf("%d\n", ans % 1000000007);
  return 0;
}
