#include <bits/stdc++.h>
using namespace std;
vector<string> split(const string& s, char c) {
  vector<string> v;
  stringstream ss(s);
  string x;
  while (getline(ss, x, c)) v.push_back(move(x));
  return v;
}
void err(vector<string>::iterator it) {}
template <typename T, typename... Args>
void err(vector<string>::iterator it, T a, Args... args) {
  cerr << it->substr((*it)[0] == ' ', it->length()) << " = " << a << '\n';
  err(++it, args...);
}
long long C, W, H;
long long dp[113 + 1];
long long ans = 0;
long long t;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> C >> W >> H;
  dp[0] = 1;
  long long hash = 0;
  t = 1;
  for (int i = 0; i < W; i++) {
    t *= H;
    t %= 1000003LL;
  }
  long long p = 0;
  for (int i = 1; i <= C + 1; i++) {
    int idx = i % (W + 1);
    hash += 1000003LL * 1000003LL - t * p;
    hash %= 1000003LL;
    hash *= H;
    hash += dp[(idx + W) % (W + 1)];
    hash %= 1000003LL;
    p = dp[idx];
    dp[idx] = hash;
  }
  cout << hash << endl;
  return 0;
}
