#include <bits/stdc++.h>
using namespace std;
const int mod = 1e6 + 3;
const int MAXN = 107;
void sq_mul(int a[MAXN][MAXN], int b[MAXN][MAXN], int n) {
  int ans[MAXN][MAXN];
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= n; j++) {
      int sum = 0;
      for (int k = 0; k <= n; k++) {
        sum = (sum + (a[i][k] * 1LL * b[k][j])) % mod;
      }
      ans[i][j] = sum;
    }
  }
  for (int i = 0; i <= n; i++)
    for (int j = 0; j <= n; j++) a[i][j] = ans[i][j];
}
void mat_expo(int mat[MAXN][MAXN], int n, int x) {
  int ans[MAXN][MAXN];
  for (int i = 0; i <= n; i++)
    for (int j = 0; j <= n; j++) ans[i][j] = (i == j);
  while (x) {
    if (x & 1) sq_mul(ans, mat, n);
    sq_mul(mat, mat, n);
    x /= 2;
  }
  for (int i = 0; i <= n; i++)
    for (int j = 0; j <= n; j++) mat[i][j] = ans[i][j];
}
int main() {
  int c, w, h;
  cin >> c >> w >> h;
  c++;
  int f[MAXN], val = 1;
  f[0] = 1;
  for (int i = 1; i <= w; i++) {
    f[i] = val;
    val = (val * 1LL * (h + 1)) % mod;
  }
  if (c <= w) {
    cout << f[c] << endl;
  } else {
    int mat[MAXN][MAXN], val = 1;
    for (int i = 0; i < w; i++)
      for (int j = 0; j <= w; j++) mat[i][j] = j == i + 1 ? 1 : 0;
    for (int i = 0; i <= w; i++) {
      mat[w][i] = val;
      val = (val * 1LL * h) % mod;
    }
    for (int i = 0; i <= w / 2; i++) swap(mat[w][i], mat[w][w - i]);
    mat_expo(mat, w, c - w);
    int ans = 0;
    for (int i = 0; i <= w; i++) {
      ans = (ans + (f[i] * 1LL * mat[w][i])) % mod;
    }
    cout << ans << endl;
  }
  return 0;
}
