#include <bits/stdc++.h>
using namespace std;
const int mo = 1e9 + 7;
struct node {
  int mat[210][210];
} qwq;
int n, k, m;
inline int ha(int x, int y) { return x * (1 << m) + y; }
node ksm(int l) {
  if (l == 1) return qwq;
  node op = ksm(l / 2), op2;
  memset(op2.mat, 0, sizeof(op2.mat));
  for (int i = 0; i < (k + 1) * (1 << m); i++)
    for (int j = 0; j < (k + 1) * (1 << m); j++)
      for (int h = 0; h < (k + 1) * (1 << m); h++)
        op2.mat[i][j] =
            (op2.mat[i][j] + 1ll * op.mat[i][h] * op.mat[h][j]) % mo;
  if (l % 2 == 0) return op2;
  node op3;
  memset(op3.mat, 0, sizeof(op3.mat));
  for (int i = 0; i < (k + 1) * (1 << m); i++)
    for (int j = 0; j < (k + 1) * (1 << m); j++)
      for (int h = 0; h < (k + 1) * (1 << m); h++)
        op3.mat[i][j] =
            (op3.mat[i][j] + 1ll * qwq.mat[i][h] * op2.mat[h][j]) % mo;
  return op3;
}
int main() {
  scanf("%d%d%d", &n, &k, &m);
  for (int i = 0; i <= k; i++)
    for (int j = 0; j < (1 << m); j++) {
      int ovo = (j << 1) % (1 << m);
      qwq.mat[ha(i, ovo)][ha(i, j)]++;
      if (i > 0) {
        int way_to_here = 1;
        for (int r = 0; r < m; r++)
          if ((1 << r) & j) way_to_here++;
        qwq.mat[ha(i, ovo | 1)][ha(i - 1, j)] += way_to_here;
      }
    }
  node uoj = ksm(n);
  int ans = 0;
  for (int i = 0; i < (1 << m); i++)
    ans = (ans + 1ll * uoj.mat[ha(k, i)][0]) % mo;
  printf("%d", ans);
  return 0;
}
