#include <bits/stdc++.h>
using namespace std;
int C, W, H;
const int N = 110;
const int MOD = 1e6 + 3;
class Matrix {
  long long grid[N][N];
  int row, col;

 public:
  Matrix() {
    row = col = N;
    memset(grid, 0, sizeof(grid));
  }
  Matrix(int r, int c) {
    row = r;
    col = c;
    memset(grid, 0, sizeof(grid));
  }
  Matrix operator*(const Matrix &b) {
    Matrix ans(row, b.col);
    for (int i = 0; i < row; i++) {
      for (int j = 0; j < b.col; j++) {
        for (int k = 0; k < col; k++) {
          ans.grid[i][j] = (ans.grid[i][j] + grid[i][k] * b.grid[k][j]) % MOD;
        }
      }
    }
    return ans;
  }
  long long getVal(int x, int y) { return grid[x][y] % MOD; }
  void setval(int x, int y, long long val) { grid[x][y] = val; }
  void setIdentity() {
    for (int i = 0; i < row; i++) {
      grid[i][i] = 1;
    }
  }
  Matrix operator^(long long exp) {
    Matrix ans(this->row, this->col);
    ans.setIdentity();
    Matrix tmp = *this;
    while (exp > 0) {
      if (exp & 1) {
        ans = ans * tmp;
      }
      tmp = tmp * tmp;
      exp >>= 1;
    }
    return ans;
  }
  void print() {
    for (int i = 0; i < row; i++) {
      for (int j = 0; j < col; j++) {
        cout << grid[i][j] << " ";
      }
      cout << endl;
    }
  }
};
int main() {
  while (scanf("%d%d%d", &C, &W, &H) != EOF) {
    Matrix b(W + 1, 1);
    b.setval(0, 0, 1);
    Matrix A(W + 1, W + 1);
    int cur = 1;
    for (int i = 0; i < W + 1; i++) {
      A.setval(0, i, cur);
      cur = cur * H % MOD;
    }
    for (int i = 1; i < W + 1; i++) {
      A.setval(i, i - 1, 1);
    }
    Matrix ans = (A ^ C);
    cout << (((ans.getVal(0, 0) + ans.getVal(0, 1)) % MOD) + MOD) % MOD << endl;
  }
}
