#include <bits/stdc++.h>
using namespace std;
template <typename S, typename T>
ostream& operator<<(ostream& out, pair<S, T> const& p) {
  out << '(' << p.first << ", " << p.second << ')';
  return out;
}
template <typename T>
ostream& operator<<(ostream& out, vector<T> const& v) {
  long long l = v.size();
  for (long long i = 0; i < l - 1; i++) out << v[i] << ' ';
  if (l > 0) out << v[l - 1];
  return out;
}
template <typename T>
void trace(const char* name, T&& arg1) {
  cout << name << " : " << arg1 << "\n";
}
template <typename T, typename... Args>
void trace(const char* names, T&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  trace(comma + 1, args...);
}
const long long N = 110;
const long long MOD = 1e6 + 3;
long long add(long long a, long long b) {
  long long res = a + b;
  if (res >= MOD) return res - MOD;
  return res;
}
long long mul(long long a, long long b) {
  long long res = a;
  res *= b;
  if (res >= MOD) return res % MOD;
  return res;
}
struct matrix {
  long long SZ;
  vector<vector<long long>> arr;
  matrix(long long s) {
    SZ = s;
    arr.resize(s, vector<long long>(s));
  }
  void reset() {
    for (long long i = 0; i < SZ; i++) {
      for (long long j = 0; j < SZ; j++) {
        arr[i][j] = 0;
      }
    }
  }
  void makeiden() {
    reset();
    for (long long i = 0; i < SZ; i++) {
      arr[i][i] = 1;
    }
  }
  matrix operator+(const matrix& o) const {
    matrix res(o.SZ);
    for (long long i = 0; i < SZ; i++) {
      for (long long j = 0; j < SZ; j++) {
        res.arr[i][j] = add(arr[i][j], o.arr[i][j]);
      }
    }
    return res;
  }
  matrix operator*(const matrix& o) const {
    matrix res(o.SZ);
    for (long long i = 0; i < SZ; i++) {
      for (long long j = 0; j < SZ; j++) {
        res.arr[i][j] = 0;
        for (long long k = 0; k < SZ; k++) {
          res.arr[i][j] = add(res.arr[i][j], mul(arr[i][k], o.arr[k][j]));
        }
      }
    }
    return res;
  }
  void print() {
    for (long long i = 0; i < SZ; i++) {
      for (long long j = 0; j < SZ; j++) {
        cout << arr[i][j] << " ";
      }
      cout << "\n";
    }
  }
};
matrix power(matrix a, long long b) {
  matrix res = a;
  b--;
  while (b) {
    if (b & 1) {
      res = res * a;
    }
    a = a * a;
    b >>= 1;
  }
  return res;
}
vector<long long> multiply_vector(matrix& a, vector<long long>& b) {
  long long SZ = a.SZ;
  vector<long long> ans(a.SZ);
  for (long long i = 0; i < SZ; i++) {
    long long curr = 0;
    for (long long j = 0; j < SZ; j++) {
      curr = (curr + (b[j] * a.arr[i][j]) % MOD) % MOD;
    }
    ans[i] = curr;
  }
  return ans;
}
vector<long long> multiply_vector(vector<long long>& b, matrix& a) {
  long long SZ = a.SZ;
  vector<long long> ans(a.SZ);
  for (long long i = 0; i < SZ; i++) {
    long long curr = 0;
    for (long long j = 0; j < SZ; j++) {
      curr = add(curr, mul(a.arr[j][i], b[j]));
    }
    ans[i] = curr;
  }
  return ans;
}
long long c, w, h;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> c >> w >> h;
  matrix m(N);
  m.reset();
  for (long long i = 0; i <= w; i++) {
    m.arr[0][i] = 1;
  }
  for (long long i = 1; i <= w; i++) {
    m.arr[i][i - 1] = h;
  }
  matrix res = power(m, c);
  long long ans = 0;
  for (long long i = 0; i <= w; i++) {
    ans = (ans + res.arr[i][0]) % MOD;
  }
  cout << ans << "\n";
}
