#include <bits/stdc++.h>
using namespace std;
const int Mod = 1000000007;
int N;
struct M {
  int a[250][250];
  M() { memset(a, 0, sizeof(a)); }
};
M I() {
  M res;
  for (int i = 0; i < N; i++) res.a[i][i] = 1;
  return res;
}
M operator*(const M& a, const M& b) {
  M ans;
  for (int i = 0; i < N; i++)
    for (int j = 0; j < N; j++)
      for (int k = 0; k < N; k++)
        ans.a[i][j] = (ans.a[i][j] + 1ll * a.a[i][k] * b.a[k][j]) % Mod;
  return ans;
}
int k, m;
int id(int x, int y) { return x * (1 << m) + y; }
M fpow(M a, int b) {
  M ans = I(), t = a;
  while (b) {
    if (b & 1) ans = ans * t;
    t = t * t;
    b >>= 1;
  }
  return ans;
}
int cnt(int x) {
  int ans = 0;
  while (x) {
    ans += (x & 1);
    x >>= 1;
  }
  return ans;
}
int main() {
  int n;
  scanf("%d %d %d", &n, &k, &m);
  N = (k + 1) * (1 << m);
  M S, T;
  S.a[0][0] = 1;
  for (int c = 0; c <= k; c++)
    for (int s = 0; s < (1 << m); s++) {
      T.a[id(c, s)][id(c, s >> 1)]++;
      if (c < k)
        T.a[id(c, s)][id(c + 1, (s >> 1) | (1 << (m - 1)))] += cnt(s) + 1;
    }
  S = S * fpow(T, n);
  int ans = 0;
  for (int s = 0; s < (1 << m); s++) ans = (ans + S.a[0][id(k, s)]) % Mod;
  printf("%d\n", ans);
  return 0;
}
