#include <bits/stdc++.h>
using namespace std;
long long N, M, MD = 1000003;
long long mpow(long long a, long long b) {
  long long r = 1;
  while (b) {
    if (b & 1) r = (r * a) % MD;
    a = (a * a) % MD;
    b >>= 1;
  }
  return r;
}
inline long long mdiv(long long a, long long b) {
  return a * mpow(b, MD - 2) % MD;
}
int main() {
  scanf("%I64d%I64d", &N, &M);
  long long ans = 0, cur = 1;
  for (int i = 2; i < M; ++i) cur = cur * i % MD;
  for (int i = 0; i < N; ++i) {
    cur = mdiv(cur, i + 1) * (i + M) % MD;
    ans = (ans + cur) % MD;
  }
  cur = 1;
  for (int i = 2; i < M; ++i) cur = cur * i % MD;
  ans = mdiv(ans, cur);
  printf("%I64d\n", ans);
  return 0;
}
