#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:667772160")
using namespace std;
struct __isoff {
  __isoff() {
    if (0) freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
    srand('C' + 'T' + 'A' + 'C' + 'Y' + 'M' + 'B' + 'A');
  }
  ~__isoff() {}
} __osafwf;
const unsigned long long p1 = 31;
const unsigned long long p2 = 29;
const double eps = 1e-8;
const double pi = acos(-1.0);
const int infi = 1e9 + 7;
const long long inf = 1e18 + 7;
const long long dd = 7e5 + 7;
const long long mod = 1e9 + 7;
const long long mod2 = 1e6 + 3;
long long fac[dd], ifac[dd];
long long pows(long long x, int p) {
  if (p == 0) return 1;
  if (p % 2) return pows(x, p - 1) * x % mod2;
  x = pows(x, p / 2);
  return x * x % mod2;
}
long long cnk(long long a, long long b) {
  return fac[a] * ifac[b] % mod2 * ifac[a - b] % mod2;
}
const int fd = 1e3 + 7;
int H[dd], IH[dd], dp[fd];
int main() {
  fac[0] = ifac[0] = 1;
  for (int i = 1; i < dd; i++) {
    fac[i] = fac[i - 1] * i % mod2;
    ifac[i] = ifac[i - 1] * pows(i, mod2 - 2) % mod2;
  }
  int c, h, w;
  cin >> c >> w >> h;
  {
    H[0] = 1;
    for (int i = 1; i < dd; i++) {
      H[i] = (H[i - 1] * h) % mod2;
    }
    IH[0] = 1;
    for (int i = 1; i < dd; i++) {
      IH[i] = (IH[i - 1] * pows(h, mod2 - 2)) % mod2;
    }
  }
  dp[0] = 1;
  deque<long long> G;
  G.push_back(1);
  G.push_back(1);
  long long t = h + 1;
  for (int i = 1; i <= c; i++) {
    if (0) {
      long long p = 1;
      for (int j = i - 1, l = 0; j >= -1 && l <= w; j--, l++) {
        long long t = 1;
        if (j >= 0) {
          t = dp[j];
        }
        dp[i] = (dp[i] + t * p) % mod2;
        p = (p * h) % mod2;
      }
    }
    {
      G.push_back(t);
      t = (t * h + t) % mod2;
      if (G.size() > w + 1) {
        t = ((t - G.front() * H[w + 1]) % mod2 + mod2) % mod2;
        G.pop_front();
      }
    }
  }
  cout << G.back();
}
