#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool chkmin(T &a, const T &b) {
  return a > b ? a = b, 1 : 0;
}
template <typename T>
inline bool chkmax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
const int INF = 0x3f3f3f3f;
const long long MOD = 1e6 + 3;
const int N = 105;
int C, W, H;
long long dp[N];
struct mat {
  long long a[N][N];
  mat() { memset(a, 0, sizeof(a)); }
};
mat A;
mat mul(mat x, mat y) {
  mat ans;
  for (int i = (0), i_end_ = (W + 1); i < i_end_; ++i)
    for (int j = (0), j_end_ = (W + 1); j < j_end_; ++j)
      if (x.a[i][j]) {
        for (int k = (0), k_end_ = (W + 1); k < k_end_; ++k)
          ans.a[i][k] = (ans.a[i][k] + x.a[i][j] * y.a[j][k]) % MOD;
      }
  return ans;
}
mat quickmul(mat m, int c) {
  mat ans;
  for (int i = (0), i_end_ = (W + 1); i < i_end_; ++i) ans.a[i][i] = 1;
  while (c) {
    if (c & 1) ans = mul(ans, m);
    m = mul(m, m);
    c >>= 1;
  }
  return ans;
}
int main() {
  cin >> C >> W >> H;
  dp[0] = 1;
  if (C <= W) {
    for (int i = (1), i_end_ = (C + 1); i < i_end_; ++i) {
      long long sum = 0;
      for (int j = 0; j < i; j++) sum = (sum + dp[j]) % MOD;
      for (int j = i; j - 1 >= 0; j--) dp[j] = dp[j - 1] * H % MOD;
      dp[0] = sum;
    }
    long long ans = 0;
    for (int i = (0), i_end_ = (C + 1); i < i_end_; ++i)
      ans = (ans + dp[i]) % MOD;
    printf("%d\n", (int)ans);
  } else {
    for (int i = (1), i_end_ = (W + 1); i < i_end_; ++i) {
      long long sum = 0;
      for (int j = 0; j < i; j++) sum = (sum + dp[j]) % MOD;
      for (int j = i; j - 1 >= 0; j--) dp[j] = dp[j - 1] * H % MOD;
      dp[0] = sum;
    }
    for (int i = (0), i_end_ = (W); i < i_end_; ++i) A.a[i][i + 1] = H;
    for (int i = (0), i_end_ = (W + 1); i < i_end_; ++i) A.a[i][0] = 1;
    mat res = quickmul(A, C - W);
    long long ans = 0;
    for (int y = (0), y_end_ = (W + 1); y < y_end_; ++y)
      for (int i = (0), i_end_ = (W + 1); i < i_end_; ++i)
        ans = (ans + dp[i] * res.a[i][y]) % MOD;
    printf("%d\n", (int)ans);
  }
}
