#include <bits/stdc++.h>
using namespace std;
template <class T>
bool uin(T &a, T b) {
  return a > b ? (a = b, true) : false;
}
template <class T>
bool uax(T &a, T b) {
  return a < b ? (a = b, true) : false;
}
const long long P = 1000000 + 3;
const int maxn = 1000000;
long long deg(long long x, long long d) {
  if (d < 0) d += P - 1;
  d %= P;
  long long y = 1;
  while (d) {
    if (d & 1) y *= x, y %= P;
    x *= x, x %= P;
    d /= 2;
  }
  return y;
}
void add(long long &x, long long y) {
  x += y;
  x %= P;
}
vector<vector<long long> > mul(vector<vector<long long> > a,
                               vector<vector<long long> > b) {
  int n = a.size();
  vector<vector<long long> > c(n, vector<long long>(n));
  for (int i = 0; i < (int)(n); ++i)
    for (int j = 0; j < (int)(n); ++j)
      for (int k = 0; k < (int)(n); ++k) add(c[i][j], a[i][k] * b[k][j]);
  return c;
}
vector<vector<long long> > deg(vector<vector<long long> > a, long long d) {
  int n = a.size();
  vector<vector<long long> > c(n, vector<long long>(n));
  for (int i = 0; i < (int)(n); ++i) c[i][i] = 1;
  while (d) {
    if (d & 1) c = mul(c, a);
    a = mul(a, a);
    d /= 2;
  }
  return c;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.precision(10);
  cout << fixed;
  int c, w, h;
  cin >> c >> w >> h;
  vector<vector<long long> > m(w + 1, vector<long long>(w + 1));
  for (int i = 0; i < (int)(w + 1); ++i) m[0][i] = deg(h, i);
  for (int i = 0; i < (int)(w); ++i) m[i + 1][i] = 1;
  vector<vector<long long> > mm = deg(m, c);
  long long ans = mm[0][0] + mm[0][1];
  ans %= P;
  cout << ans << '\n';
  return 0;
}
