#include <bits/stdc++.h>
using namespace std;
const int SIZE = 110;
const int BASE = 1E6 + 3;
struct Matrix {
  int n, m;
  int a[SIZE][SIZE];
  Matrix(int n = 0, int m = 0) : n(n), m(m) { memset(a, 0, sizeof(a)); }
  int* operator[](int p) { return a[p]; }
  const int* operator[](int p) const { return a[p]; }
};
Matrix BASE_MATRIX(int size) {
  Matrix res(size, size);
  for (int i = 0; i < size; i++) res[i][i] = 1;
  return res;
}
Matrix operator*(const Matrix& a, const Matrix& b) {
  Matrix res(a.n, b.m);
  for (int i = 0; i < a.n; i++)
    for (int j = 0; j < b.m; j++)
      for (int k = 0; k < a.m; k++)
        res[i][j] = ((long long)a[i][k] * b[k][j] + res[i][j]) % BASE;
  return res;
}
Matrix operator^(const Matrix& a, const int n) {
  if (n == 0) return BASE_MATRIX(a.m);
  Matrix tmp = a ^ (n / 2);
  tmp = tmp * tmp;
  if (n % 2) tmp = a * tmp;
  return tmp;
}
int power(int x, int n) {
  if (n == 0) return 1;
  long long tmp = power(x, n / 2);
  tmp = tmp * tmp;
  if (n % 2) tmp = tmp * x;
  tmp %= BASE;
  return tmp;
}
int n, w, h;
int main() {
  scanf("%d%d%d", &n, &w, &h);
  Matrix A(1, w + 1);
  A[0][w] = 1;
  Matrix B(w + 1, w + 1);
  for (int i = 0; i < w; i++) B[i + 1][i] = 1;
  for (int i = 0; i < w + 1; i++) B[i][w] = power(h, w - i);
  B = B ^ (n + 1);
  A = A * B;
  printf("%d", A[0][w]);
}
