#include <bits/stdc++.h>
int n, m, f[700005], i;
int Pow(int a, int b) {
  int s = 1;
  for (; b; b >>= 1, a = (long long)a * a % 1000003)
    if (b & 1) s = (long long)s * a % 1000003;
  return s;
}
int main() {
  scanf("%d%d", &n, &m);
  n += m;
  for (i = f[0] = 1; i <= n; i++) f[i] = (long long)f[i - 1] * i % 1000003;
  i = (long long)f[n] * Pow(f[m], 1000003 - 2) % 1000003 *
          Pow(f[n - m], 1000003 - 2) % 1000003 -
      1;
  if (i < 0) i += 1000003;
  printf("%d\n", i);
  return 0;
}
