#include <bits/stdc++.h>
using namespace std;
const int N = 100010, INF = (int)1e9, mod = (int)1e6 + 3;
struct Matrix {
  vector<vector<int> > M;
  vector<int>& operator[](int x) { return M[x]; }
  int size() { return M.size(); }
  Matrix(int n = 0, int m = 0) { M.assign(n, vector<int>(m, 0)); }
};
Matrix operator*(Matrix a, Matrix b) {
  int m = a.size(), n = b.size(), p = b[0].size();
  Matrix c = Matrix(m, p);
  for (int i = (int)(0); i <= (int)(m - 1); i++)
    for (int j = (int)(0); j <= (int)(p - 1); j++)
      for (int k = (int)(0); k <= (int)(n - 1); k++)
        c[i][j] = (c[i][j] + (1ll * a[i][k] * b[k][j]) % mod) % mod;
  return c;
}
Matrix pw(Matrix a, int n) {
  int m = a.size();
  Matrix r = Matrix(m, m);
  for (int i = (int)(0); i <= (int)(m - 1); i++) r[i][i] = 1;
  for (int i = 0; (1LL << i) <= n; i++) {
    if (n & (1LL << i)) r = r * a;
    a = a * a;
  }
  return r;
}
int c, w, h;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> c >> w >> h;
  Matrix F = Matrix(w + 1, 1), Unit = Matrix(w + 1, w + 1);
  F[0][0] = 1;
  for (int i = (int)(0); i <= (int)(w - 1); i++) Unit[i + 1][i] = h;
  for (int i = (int)(0); i <= (int)(w); i++) Unit[0][i] = 1;
  Unit = pw(Unit, c);
  F = Unit * F;
  int ans = 0;
  for (int i = (int)(0); i <= (int)(w); i++) ans = (ans + F[i][0]) % mod;
  cout << ans << endl;
}
