#include <bits/stdc++.h>
using namespace std;
template <typename T>
bool chkmx(T &x, T y) {
  return x < y ? x = y, true : false;
}
template <typename T>
bool chkmn(T &x, T y) {
  return x > y ? x = y, true : false;
}
const int maxw = 250;
const int mod = 1e9 + 7;
int n, m, k, mask, lim, ans;
inline void upd(int &x) { x = (x >= mod) ? (x - mod) : x; }
struct Mat {
  int a[maxw][maxw];
  Mat() { memset(a, 0, sizeof a); }
  inline int *operator[](int x) { return a[x]; }
  inline friend Mat operator*(Mat x, Mat y) {
    Mat ans;
    for (int i = (0); i <= int(lim); i++)
      for (int j = (0); j <= int(lim); j++)
        for (int k = (0); k <= int(lim); k++)
          upd(ans[i][j] += 1ll * x[i][k] * y[k][j] % mod);
    return ans;
  }
} x, y;
Mat fpw(Mat a, int b) {
  Mat ans = a;
  b--;
  for (; b; b >>= 1, a = a * a)
    if (b & 1) ans = ans * a;
  return ans;
}
inline int id(int i, int j) { return i * (mask + 1) + j; }
int main() {
  scanf("%d%d%d", &n, &k, &m), mask = (1 << m) - 1,
                               lim = (k + 1) * (mask + 1) - 1;
  for (int i = (0); i <= int(mask); i++)
    for (int j = (0); j <= int(k - 1); j++)
      y[id(j, i)][id(j + 1, (1 | ((i << 1) & mask)))] =
          1 + __builtin_popcount(i);
  for (int i = (0); i <= int(mask); i++)
    for (int j = (0); j <= int(k); j++)
      y[id(j, i)][id(j, ((i << 1) & mask))] = 1;
  x[0][0] = 1, x = x * fpw(y, n);
  for (int i = (id(k, 0)); i <= int(lim); i++) upd(ans += x[0][i]);
  printf("%d\n", ans);
  return 0;
}
