#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
long long M[210][210], tmp[210][210], res[210][210], B1[210], B2[210];
pair<int, int> r[210];
int f[100][100];
int main() {
  int n, k, m;
  scanf("%d%d%d", &n, &k, &m);
  int h = 1;
  for (int i = 0; i <= k; i++) {
    for (int j = 0; j < (1 << m); j++) {
      f[i][j] = h;
      r[h] = pair<int, int>(i, j);
      h++;
    }
  }
  B1[1] = 1;
  h--;
  for (int i = 0; i <= k; i++) {
    for (int j = 0; j < (1 << m); j++) {
      int jj = (j * 2) % (1 << m);
      int x1 = f[i][jj], x2 = f[i][j];
      M[x1][x2] = 1;
      if (i < k) {
        int ways = 1 + __builtin_popcount(j);
        int x1 = f[i + 1][jj | 1], x2 = f[i][j];
        M[x1][x2] = ways;
      }
    }
  }
  bool st = 0;
  while (n) {
    if (n % 2) {
      if (!st)
        for (int i = 1; i <= h; i++)
          for (int j = 1; j <= h; j++) res[i][j] = M[i][j];
      else {
        memset(tmp, 0, sizeof(tmp));
        for (int i = 1; i <= h; i++)
          for (int j = 1; j <= h; j++)
            for (int k = 1; k <= h; k++)
              tmp[i][j] = (tmp[i][j] + M[i][k] * res[k][j]) % mod;
        for (int i = 1; i <= h; i++)
          for (int j = 1; j <= h; j++) res[i][j] = tmp[i][j];
      }
      st = 1;
    }
    memset(tmp, 0, sizeof(tmp));
    for (int i = 1; i <= h; i++)
      for (int j = 1; j <= h; j++)
        for (int k = 1; k <= h; k++)
          tmp[i][j] = (tmp[i][j] + M[i][k] * M[k][j]) % mod;
    for (int i = 1; i <= h; i++)
      for (int j = 1; j <= h; j++) M[i][j] = tmp[i][j];
    n /= 2;
  }
  for (int i = 1; i <= h; i++) {
    for (int j = 1; j <= h; j++) B2[i] = (B2[i] + res[i][j] * B1[j]) % mod;
  }
  int ans = 0;
  for (int i = 1; i <= h; i++) {
    int kk = r[i].first;
    if (kk == k) ans = (ans + B2[i]) % mod;
  }
  printf("%d\n", ans);
}
