#include <bits/stdc++.h>
using namespace std;
long long K = 1000003;
long long c, w, h;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin >> c >> w >> h;
  long long hh = 1;
  for (long long i = 0; i < w; i++) {
    hh = (hh * h) % K;
  }
  queue<long long> q;
  q.push(1);
  long long summ = 1;
  for (long long i = 0; i < c; i++) {
    long long element = 0;
    if (q.size() == w + 1) element = (q.front() * hh) % K;
    long long new_el = summ;
    summ = (summ - element) * h;
    summ += new_el;
    summ %= K;
    if (q.size() == w + 1) q.pop();
    q.push(new_el);
  }
  cout << (summ + K) % K << endl;
  return 0;
}
