#include <cstdio>

const int maxS = 2000;
const int mod = 1000000007;

int res[maxS + 1];

int main() {
  int s;
  scanf("%d", &s);
  res[0] = 1;
  for (int x = 1; x <= s; ++x) {
    res[x] = 0;
    for (int c = 3; c <= x; ++c) {
      res[x] = (res[x] + res[x - c]) % mod;
    }
  }
  printf("%d\n", res[s]);
  return 0;
}
