#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
template <class T, class U>
inline void Max(T &a, U b) {
  if (a < b) a = b;
}
template <class T, class U>
inline void Min(T &a, U b) {
  if (a > b) a = b;
}
inline void add(int &a, int b) {
  a += b;
  while (a >= 1000003) a -= 1000003;
}
int pow(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = ans * (long long)a % 1000003;
    a = (long long)a * a % 1000003;
    b >>= 1;
  }
  return ans;
}
int f[110], m, a[110][110], b[110][110];
long long c[110][110];
void mul(int a[110][110], int b[110][110]) {
  for (int i = 0; i < m; i++)
    for (int j = 0; j < m; j++) {
      c[i][j] = 0;
      for (int k = 0; k < m; k++) {
        c[i][j] += 1LL * a[i][k] * b[k][j] % 1000003;
      }
    }
  for (int i = 0; i < m; i++)
    for (int j = 0; j < m; j++) a[i][j] = c[i][j] % 1000003;
}
int main() {
  int T = 100, j, k, i, ca = 0, n;
  int w, h;
  scanf("%d%d%d", &n, &w, &h);
  f[0] = 1;
  for (int i = 1; i < w + 1; i++) f[i] = 1LL * f[i - 1] * h % 1000003;
  if (n <= w) {
    int ans = 1;
    for (int i = 0; i < n; i++) ans = 1LL * ans * (h + 1) % 1000003;
    printf("%d\n", ans);
    return 0;
  }
  n -= w;
  m = w + 1;
  for (int i = 0; i < m; i++) a[0][i] = f[i];
  for (int i = 1; i < m; i++) a[i][i - 1] = 1;
  for (int i = 0; i < m; i++) b[i][i] = 1;
  while (n) {
    if (n & 1) mul(b, a);
    mul(a, a);
    n >>= 1;
  }
  long long ans = 0, q = 1;
  for (int i = m - 1; i >= 0; i--) {
    ans += b[0][i] * q % 1000003;
    q = q * (h + 1) % 1000003;
  }
  printf("%d\n", ans % 1000003);
  return 0;
}
