#include <bits/stdc++.h>
using namespace std;
long long mem[205];
int n, w, h;
long long pol[110];
int main() {
  scanf("%d%d%d", &n, &w, &h);
  pol[0] = 1ll;
  for (int i = 1; i <= w + 1; i++) {
    pol[i] = (pol[i - 1] * (long long)h) % 1000003ll;
  }
  mem[0] = 1ll;
  long long ans = 1ll;
  long long cur = 1ll;
  for (int i = 1; i <= n; i++) {
    mem[i % 200] = cur;
    if (i <= w) mem[i % 200] = (mem[i % 200] + pol[i]) % 1000003ll;
    cur *= (long long)h;
    cur %= 1000003ll;
    cur += mem[i % 200];
    if (i - w - 1 >= 0)
      cur -= (pol[w + 1] * mem[(i - w - 1) % 200]) % 1000003ll;
    cur = (cur + 1000003ll) % 1000003ll;
  }
  cout << mem[n % 200] << '\n';
}
