#include <bits/stdc++.h>
using namespace std;
long long c, w, h, mod = 1e6 + 3, start[110][110], mat[110][110], dp[110];
void mul(long long a[110][110], long long b[110][110]) {
  long long ret[110][110];
  memset(ret, 0, sizeof(ret));
  for (int i = 1; i <= w + 1; i++)
    for (int j = 1; j <= w + 1; j++)
      for (int k = 1; k <= w + 1; k++)
        ret[i][j] = (ret[i][j] + a[i][k] * b[k][j]) % mod;
  for (int i = 1; i <= w + 1; i++)
    for (int j = 1; j <= w + 1; j++) a[i][j] = ret[i][j];
}
void step(long long mat[110][110], long long pw) {
  if (pw < 0) return;
  long long ret[110][110];
  memset(ret, 0, sizeof(ret));
  for (int i = 1; i <= w + 1; i++) ret[i][i] = 1;
  for (int i = 0; i <= 31; i++) {
    if (pw & (1ll << i)) mul(ret, mat);
    mul(mat, mat);
  }
  for (int i = 1; i <= w + 1; i++)
    for (int j = 1; j <= w + 1; j++) mat[i][j] = ret[i][j];
}
void go() {
  dp[0] = 1;
  for (int i = 1; i <= w; i++) {
    long long pom = 1;
    for (int j = i - 1; j > 0; j--) {
      dp[i] = (dp[i] + pom * dp[j]);
      pom = (pom * (h)) % mod;
    }
    pom = (pom * (h + 1)) % mod;
    dp[i] = (dp[i] + pom) % mod;
  }
}
int main() {
  scanf("%lld %lld %lld", &c, &w, &h);
  go();
  for (int i = 1; i <= w + 1; i++) start[1][i] = dp[i - 1];
  if (w >= c) {
    printf("%lld\n", dp[c]);
    return 0;
  }
  for (int i = 1; i < w + 1; i++) mat[i + 1][i] = 1;
  long long pom = 1;
  for (int i = w + 1; i >= 1; i--) {
    mat[i][w + 1] = pom;
    pom = (pom * (h)) % mod;
  }
  step(mat, c - w);
  mul(start, mat);
  printf("%lld\n", start[1][w + 1]);
  return 0;
}
