#include <bits/stdc++.h>
using namespace std;
const int64_t MOD = 1e9 + 7;
void add(int64_t& a, int64_t b) { a = (a + b) % MOD; }
int nth_bit(int64_t num, int n) { return (num >> n) & 1; }
const int SZ = 14 * 16;
void matmul(int64_t A[SZ][SZ], int64_t B[SZ][SZ]) {
  int64_t ret[SZ][SZ] = {0};
  for (int i = 0; i < SZ; i++)
    for (int j = 0; j < SZ; j++)
      for (int k = 0; k < SZ; k++) add(ret[i][j], A[i][k] * B[k][j]);
  for (int i = 0; i < SZ; i++)
    for (int j = 0; j < SZ; j++) A[i][j] = ret[i][j];
}
int main() {
  int N, K, M;
  cin >> N >> K >> M;
  static int64_t A[SZ][SZ];
  for (int j = 0; j <= K; j++)
    for (int bits = 0; bits < 16; bits++) {
      int pos = 1;
      for (int k = 0; k < M; k++)
        if (nth_bit(bits, k)) pos++;
      add(A[(j + 1) * 16 + (bits << 1) % 16 + 1][j * 16 + bits], pos);
      add(A[j * 16 + (bits << 1) % 16][j * 16 + bits], 1);
    }
  static int64_t B[SZ][SZ];
  for (int i = 0; i < SZ; i++) B[i][i] = 1;
  while (N > 0) {
    if (N % 2) matmul(B, A);
    matmul(A, A);
    N /= 2;
  }
  int64_t ans = 0;
  for (int bits = 0; bits < 16; bits++) add(ans, B[K * 16 + bits][0]);
  cout << ans << endl;
  return 0;
}
