const val MOD = 1000000007 fun main() { val (n, target, k) = readLine()!!.trim().split(' ').map(String::toInt) val initial = n * (n - 1) / 2 * k if (initial !in 0 .. target) { println(0) return } val memo = IntArray(target - initial + 1).also{it[0] = 1} for (i in 0 until n) { val rest = n - i for (j in 0 .. memo.lastIndex - rest) { memo[j + rest] = (memo[j + rest] + memo[j]) % MOD } } println(memo.last()) }