#include <bits/stdc++.h>
using namespace std;
const long long inf = 0x3f3f3f3f;
const int mod = (1e6) + 3;
vector<vector<long long> > mul(vector<vector<long long> > &A,
                               vector<vector<long long> > &B) {
  vector<vector<long long> > C(A.size(), vector<long long>(B[0].size()));
  for (int i = 0; i < A.size(); ++i) {
    for (int k = 0; k < B.size(); ++k) {
      for (int j = 0; j < B[0].size(); ++j) {
        C[i][j] = (C[i][j] + A[i][k] * B[k][j]) % mod;
      }
    }
  }
  return C;
}
vector<vector<long long> > pow(vector<vector<long long> > A, int n) {
  vector<vector<long long> > B(A.size(), vector<long long>(A.size()));
  for (int i = 0; i < A.size(); ++i) {
    B[i][i] = 1;
  }
  while (n > 0) {
    if (n & 1) B = mul(B, A);
    A = mul(A, A);
    n >>= 1;
  }
  return B;
}
int main() {
  int c, w, h;
  cin >> c >> w >> h;
  vector<vector<long long> > a(w + 1, vector<long long>(w + 1));
  for (int i = 0; i <= w; ++i) {
    a[0][i] = 1;
  }
  for (int i = 1; i <= w; ++i) {
    a[i][i - 1] = h;
  }
  a = pow(a, c);
  long long ans = 0;
  for (int i = 0; i <= w; ++i) {
    ans += a[i][0];
    ans %= mod;
  }
  cout << ans << endl;
}
