#include <bits/stdc++.h>
using namespace std;
const long long linf = 1e18 + 5;
int mod = (int)1000003;
const int logN = 18;
const int inf = 1e9 + 9;
const int N = 2003;
int a[132], n, m, x, c, w, h;
class matrix {
 public:
  vector<vector<int> > v;
  int n;
  matrix(int x) {
    n = x;
    v.resize(x + 1);
    for (int i = 1; i <= x; i++) v[i].resize(x + 1, 0);
  }
  vector<int>& operator[](int x) { return v[x]; }
  matrix operator*(matrix y) {
    matrix ans(n);
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= n; j++)
        for (int k = 1; k <= n; k++)
          ans[i][j] = (ans[i][j] + (long long)v[i][k] * y[k][j]) % mod;
    return ans;
  }
};
matrix FE(matrix A, int c) {
  matrix ans(A.n);
  int n = A.n;
  for (int i = 1; i <= n; i++) ans[i][i] = 1;
  while (c) {
    if (c & 1) ans = ans * A;
    A = A * A;
    c >>= 1;
  }
  return ans;
}
int main() {
  scanf("%d %d %d", &c, &w, &h);
  a[0] = 1;
  for (int i = 1; i <= w; i++) {
    a[i] = a[i - 1] * (long long)(h) % mod;
  }
  matrix A(w + 1);
  int sz = w + 1;
  for (int i = 2; i <= sz; i++) A[i][i - 1] = 1;
  A[1][1] = 1;
  for (int i = 1; i <= w; i++) {
    A[1][i + 1] = a[i];
  }
  A = FE(A, c);
  printf("%lld\n", (A[1][1] + A[1][2]) % mod);
}
