#include <bits/stdc++.h>
using namespace std;
char getc() {
  char c = getchar();
  while ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') && (c < '0' || c > '9'))
    c = getchar();
  return c;
}
int gcd(int n, int m) { return m == 0 ? n : gcd(m, n % m); }
int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9')
    x = (x << 1) + (x << 3) + (c ^ 48), c = getchar();
  return x * f;
}
int n, m, k, ans, size[210];
struct matrix {
  int n, a[210][210];
  matrix operator*(const matrix& b) const {
    matrix c;
    c.n = n;
    memset(c.a, 0, sizeof(c.a));
    for (int i = 0; i < n; i++)
      for (int j = 0; j < b.n; j++)
        for (int k = 0; k < b.n; k++)
          c.a[i][j] = (c.a[i][j] + 1ll * a[i][k] * b.a[k][j]) % 1000000007;
    return c;
  }
} f, a;
int trans(int x, int y) { return (x << m) + y; }
signed main() {
  n = read(), k = read(), m = read();
  f.n = 1;
  f.a[0][0] = 1;
  a.n = k + 1 << m;
  for (int i = 1; i < (1 << m); i++) size[i] = size[i ^ (i & -i)] + 1;
  for (int i = 0; i <= k; i++)
    for (int j = 0; j < (1 << m); j++) {
      a.a[trans(i, j)][trans(i, (j << 1) & (1 << m) - 1)]++;
      if (i < k)
        a.a[trans(i, j)][trans(i + 1, ((j << 1) & (1 << m) - 1) | 1)] +=
            size[j] + 1;
    }
  for (; n; n >>= 1, a = a * a)
    if (n & 1) f = f * a;
  for (int j = 0; j < (1 << m); j++)
    ans = (ans + f.a[0][trans(k, j)]) % 1000000007;
  cout << ans;
  return 0;
}
