#include <bits/stdc++.h>
int n, m, ans;
long long fac[700015] = {1};
long long Pow(long long a, long long b) {
  long long k;
  if (b == 0) return 1;
  if (b == 1) return a;
  k = Pow(a, b / 2);
  k = k * k % 1000003;
  if (b % 2 == 1) k = k * a % 1000003;
  return k;
}
void init() {
  for (int i = 1; i <= 700015 - 10; i++) fac[i] = i * fac[i - 1] % 1000003;
}
int inv(int p) { return Pow(p, 1000001); }
int C(int x, int y) {
  return fac[x] * inv(fac[y]) % 1000003 * inv(fac[x - y]) % 1000003;
}
int main(void) {
  int i;
  scanf("%d%d", &n, &m);
  init();
  for (i = m; i <= n + m - 1; i++) ans = (ans + C(i, m - 1)) % 1000003;
  printf("%d\n", ans);
  return 0;
}
