#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e6 + 3;
const int MAXN = 1000, MAXW = 300;
long long dp[MAXW];
long long f[MAXW];
int main() {
  long long c, w, h;
  cin >> c >> w >> h;
  long long period = w + 2;
  f[0] = 1;
  for (int i = 1; i <= w; i++) f[i] = 1LL * f[i - 1] * h % MOD;
  dp[0] = 1;
  for (long long n = 1; n <= period; n++) {
    int mina = n % period;
    dp[mina] = 0;
    for (int i = 0; i <= min(n, w); i++) {
      long long mem = 0;
      if (n - i - 1 == -1)
        mem = 1;
      else
        mem = dp[(n - i - 1) % period];
      dp[mina] += (1LL * mem * f[i]) % MOD;
      if (dp[mina] > MOD) dp[mina] -= MOD;
    }
  }
  for (int n = period + 1; n <= c; n++) {
    long long mina = n % period;
    long long shayan = (n - 1) % period;
    long long abtin = (n - w - 2) % period;
    dp[mina] = (dp[shayan] - (1LL * dp[abtin] * f[w]) % MOD + 3 * MOD) % MOD;
    dp[mina] = (dp[mina] * h) % MOD + dp[shayan];
    dp[mina] %= MOD;
  }
  cout << dp[c % period] << endl;
  return 0;
}
