#include <bits/stdc++.h>
using namespace std;
const int mod = 1e6 + 3;
int n, w, h;
struct Matrix {
  int data[111][111];
  Matrix() { memset(data, 0, sizeof data); }
  inline int *operator[](int ind) { return data[ind]; }
} mat, res;
inline Matrix operator*(const Matrix &a, const Matrix &b) {
  Matrix ans;
  for (int i = 0; i < w; i++)
    for (int j = 0; j < w; j++)
      for (int k = 0; k < w; k++)
        ans[i][k] =
            (ans[i][k] + (1LL * a.data[i][j] * b.data[j][k] % mod)) % mod;
  return ans;
}
inline void solve(int y) {
  while (y > 0) {
    if (y & 1) {
      res = res * mat;
    }
    mat = mat * mat;
    y >>= 1;
  }
}
int main() {
  cin >> n >> w >> h;
  w++;
  mat[0][0] = res[0][0] = 1;
  for (int i = 1; i < w; i++) {
    mat[0][i] = 1;
    mat[i][i - 1] = h;
    res[i][i] = 1;
  }
  solve(n);
  long long rs = 0;
  for (int i = 0; i < w; i++) {
    rs = (rs + res[i][0]) % mod;
  }
  cout << rs << endl;
  return 0;
}
