#include <bits/stdc++.h>
using namespace std;
const int maxc = 210;
const int mod = 1e9 + 7;
struct matrix {
  int x[maxc][maxc];
  matrix() { memset(x, 0, sizeof(x)); }
};
matrix dp, mul;
int nod, n, k, m, id[15][20];
matrix operator*(matrix A, matrix B) {
  matrix C;
  for (int i = 1; i <= nod; ++i)
    for (int j = 1; j <= nod; ++j)
      for (int t = 1; t <= nod; ++t)
        C.x[i][j] = (C.x[i][j] + 1LL * A.x[i][t] * B.x[t][j]) % mod;
  return C;
}
matrix operator^(matrix A, int B) {
  matrix C;
  for (int i = 1; i <= nod; ++i) C.x[i][i] = 1;
  for (; B; A = A * A, B >>= 1)
    if (B & 1) C = C * A;
  return C;
}
void readf() {
  cin >> n >> k >> m;
  nod = 0;
  for (int i = 0; i <= k; ++i)
    for (int mask = 0; mask < (1 << m); ++mask) id[i][mask] = ++nod;
  dp.x[1][id[0][0]] = dp.x[1][id[1][1]] = 1;
}
void solve() {
  for (int i = 0; i <= k; ++i)
    for (int mask = 0; mask < (1 << m); ++mask) {
      int newmas = (mask << 1) & ((1 << m) - 1);
      mul.x[id[i][mask]][id[i][newmas]] = 1;
      mul.x[id[i][mask]][id[i + 1][newmas | 1]] =
          __builtin_popcount((mask)) + 1;
    }
  if (n > 0) dp = dp * (mul ^ (n - 1));
  int ans = 0;
  for (int mask = 0; mask < (1 << m); ++mask)
    ans = (ans + dp.x[1][id[k][mask]]) % mod;
  cout << ans << '\n';
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  readf();
  solve();
}
