const val mod = (1e9 + 7).toInt()
fun main() {
    val s = readLine()!!.toInt()

    val ans = Array(2001) { 0 }

    ans[0] = 1
    for (x in 1..s) {
        for (y in 3..x) ans[x] = (ans[x] + ans[x - y]) % mod
    }
    println(ans[s])
}