#include <bits/stdc++.h>
using namespace std;
void read(int &x) {
  x = 0;
  int f = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') f = -f;
  for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0';
  x *= f;
}
void print(int x) {
  if (x < 0) putchar('-'), x = -x;
  if (!x) return;
  print(x / 10), putchar(x % 10 + 48);
}
void write(int x) {
  if (!x)
    putchar('0');
  else
    print(x);
  putchar('\n');
}
const int maxn = 1e6 + 10;
const int inf = 1e9;
const double eps = 1e-8;
const int mod = 1e9 + 7;
int n, k, m, N;
struct matrix {
  int a[300][300];
  matrix() { memset(a, 0, sizeof a); }
  int *operator[](int x) { return a[x]; }
  matrix operator*(const matrix &r) const {
    matrix c;
    for (int i = 0; i < N; i++)
      for (int j = 0; j < N; j++)
        for (int k = 0; k < N; k++)
          c[i][j] = (c[i][j] + 1ll * a[i][k] * r.a[k][j] % mod) % mod;
    return c;
  }
  matrix operator^(int x) const {
    matrix r, c = *this;
    for (int i = 0; i < N; i++) r[i][i] = 1;
    for (; x; x >>= 1, c = c * c)
      if (x & 1) r = r * c;
    return r;
  }
} tr, st;
int id(int a, int b) { return a * (1 << m) + b; }
int main() {
  read(n), read(k), read(m);
  N = (k + 1) * (1 << m);
  st[0][0] = 1;
  for (int i = 0; i <= k; i++)
    for (int s = 0; s < 1 << m; s++) {
      if (i < k)
        tr[id(i, s)][id(i + 1, (s >> 1) | (1 << (m - 1)))] +=
            __builtin_popcount(s) + 1;
      tr[id(i, s)][id(i, s >> 1)]++;
    }
  st = st * (tr ^ n);
  int ans = 0;
  for (int i = 0; i < 1 << m; i++) ans = (ans + st[0][id(k, i)]) % mod;
  write(ans);
  return 0;
}
