#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000003;
long long POW(long long a, long long n) {
  long long re = 1;
  while (n > 0) {
    if (n & 1) re = re * a % MOD;
    a = a * a % MOD;
    n >>= 1;
  }
  return 1;
}
long long clear(long long a) {
  a %= MOD;
  if (a < 0) a += MOD;
  return a;
}
long long C, W, H[300];
long long dp[300], S;
int main() {
  cin >> C >> W >> H[1];
  H[0] = 1, S = W + 3;
  for (int i = 2; i <= W + 1; i++) H[i] = H[i - 1] * H[1] % MOD;
  dp[0] = 1;
  for (int i = 1; i <= W; i++) dp[i] = dp[i - 1] * (H[1] + 1) % MOD;
  dp[W + 1] = 0;
  for (int i = 0; i <= W; i++) {
    dp[W + 1] += dp[W - i] * H[i] % MOD;
  }
  dp[W + 1] %= MOD;
  for (int i = W + 2; i <= C; i++) {
    dp[i % S] =
        dp[(i - 1) % S] +
        clear(dp[(i - 1) % S] - dp[(i - W - 2) % S] * H[W]) * H[1] % MOD;
    dp[i % S] = clear(dp[i % S]);
  }
  cout << dp[C % S];
}
