#include <bits/stdc++.h>
using namespace std;
const int N = 100 + 7;
const int M = 59;
const int mid = M / 2;
const int mod = 1e9 + 9;
const int inf = 1e6 + 3;
const long long linf = 1ll * inf * inf;
const double pi = acos(-1);
const double eps = 1e-7;
const double ep = 1e-5;
const int maxn = 1e5 + 7;
const double PI = acos(-1);
int C, W, H;
int dp[2][107];
struct matrix {
  long long a[N][N];
  int n, m;
  matrix(int _n, int _m) {
    n = _n;
    m = _m;
    memset(a, 0, sizeof(a));
  }
  matrix(int _n, int _m, bool itype) {
    n = _n;
    m = _m;
    if (itype) {
      for (int i = (1); i < (n + 1); i++) a[i][i] = 1;
    }
  }
  matrix operator*(matrix u) {
    matrix c(n, u.m);
    for (int i = 1; i <= c.n; i++) {
      for (int j = 1; j <= c.m; j++) {
        long long tmp = 0;
        for (int t = 1; t <= m; t++)
          tmp = (tmp + (long long)a[i][t] * u.a[t][j]) % inf;
        c.a[i][j] = tmp;
      }
    }
    return c;
  }
  void print() {
    for (int i = 1; i <= n; ++i) {
      for (int j = 1; j <= m; ++j) printf("%lld ", a[i][j]);
      printf("\n");
    }
  }
};
void solve() {
  cin >> C >> W >> H;
  matrix b(W + 1, W + 1);
  for (int i = (2); i < (W + 2); i++) {
    b.a[i - 1][i] = H;
  }
  for (int i = (1); i < (W + 2); i++) b.a[i][1] = 1;
  matrix I(W + 1, W + 1, true);
  while (C > 0) {
    if (C & 1) {
      I = I * b;
    }
    b = b * b;
    C >>= 1;
  }
  matrix res(1, W + 1);
  res.a[1][1] = 1;
  res = res * I;
  int ans = 0;
  for (int i = (1); i < (res.m + 1); i++) ans = (ans + res.a[1][i]) % inf;
  cout << ans;
}
int main() {
  int T = 1;
  for (int i = (1); i < (T + 1); i++) {
    solve();
  }
}
