fun main() {
    val s = readInt()

    val mod = 1000000007L
    val partitions = LongArray(s + 1)
    partitions[0] = 1
    for (i in 3..s) {
        for (sub in 3..i) {
            partitions[i] = (partitions[i] + partitions[i - sub]) % mod
        }
    }

    println(partitions[s])
}

// Input Reader
private fun readLn() = readLine()!!

private fun readInt() = readLn().toInt()
