#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
inline int read() {
  int x = 0;
  char ch = getchar();
  while (ch < '0') ch = getchar();
  while (ch >= '0') {
    x = x * 10 + ch - 48;
    ch = getchar();
  }
  return x;
}
struct LCT {
  int fa[N], ch[N][2], lazy[N];
  int stk[N], top;
  inline void init() {
    top = 0;
    memset(fa, 0, sizeof(fa));
    memset(ch, 0, sizeof(ch));
    memset(lazy, 0, sizeof(lazy));
  }
  inline void pushdown(int root) {
    if (lazy[root]) {
      lazy[root] = 0;
      swap(ch[root][0], ch[root][1]);
      lazy[ch[root][0]] ^= 1;
      lazy[ch[root][1]] ^= 1;
    }
  }
  inline bool isroot(int root) {
    return ch[fa[root]][0] != root && ch[fa[root]][1] != root;
  }
  void rotate(int root) {
    int ffa = fa[root], gfa = fa[ffa];
    int t1 = (root != ch[ffa][0]), t2 = (ffa != ch[gfa][0]),
        tc = ch[root][t1 ^ 1];
    if (!isroot(ffa)) ch[gfa][t2] = root;
    fa[tc] = ffa;
    fa[root] = gfa;
    ch[root][t1 ^ 1] = ffa;
    fa[ffa] = root;
    ch[ffa][t1] = tc;
  }
  void splay(int root) {
    stk[++top] = root;
    for (int i = root; !isroot(i); i = fa[i]) stk[++top] = fa[i];
    while (top) pushdown(stk[top--]);
    while (!isroot(root)) {
      int ffa = fa[root], gfa = fa[ffa];
      if (!isroot(ffa))
        root == ch[ffa][0] ^ ffa == ch[gfa][0] ? rotate(root) : rotate(ffa);
      rotate(root);
    }
  }
  inline void access(int root) {
    int temp = 0;
    while (root) {
      splay(root);
      ch[root][1] = temp;
      temp = root;
      root = fa[root];
    }
  }
  inline void makeroot(int root) {
    access(root);
    splay(root);
    lazy[root] ^= 1;
  }
  inline void link(int root1, int root2) {
    makeroot(root1);
    fa[root1] = root2;
  }
  inline void cut(int root1, int root2) {
    makeroot(root1);
    access(root2);
    splay(root2);
    ch[root2][0] = fa[root1] = 0;
  }
  inline int findroot(int root) {
    access(root);
    splay(root);
    int temp = root;
    while (ch[temp][0]) temp = ch[temp][0];
    return temp;
  }
};
void exgcd(long long a, long long b, long long &d, long long &x, long long &y) {
  if (b == 0) {
    x = 1, y = 0, d = a;
  } else {
    exgcd(b, a % b, d, y, x);
    y -= a / b * x;
  }
}
long long inv(int a, int n) {
  long long d, x, y;
  exgcd(a, n, d, x, y);
  return d == 1 ? (x % n + n) % n : -1;
}
long long mpow(long long a, long long b, long long c) {
  long long rt;
  for (rt = 1; b; b >>= 1, a = a * a % c)
    if (b & 1) rt = rt * a % c;
  return rt;
}
namespace Task3 {
struct Pair {
  int s, k;
  Pair(int s, int k) : s(s), k(k) {}
};
long long aa[50], mm[50];
long long pres[1001000];
long long pp[50], cc[50], ppp[50], tot;
long long china(int n, long long *a, long long *m) {
  int M = 1;
  for (int i = 0; i < n; i++) M *= m[i];
  int rt = 0;
  for (int i = 0; i < n; i++) {
    long long Mi = M / m[i];
    rt = (rt + Mi * inv(Mi, m[i]) * a[i]) % M;
  }
  return rt;
}
void init(int p, int pp) {
  pres[0] = 1;
  for (int i = 1; i <= pp; i++) {
    if (i % p == 0) {
      pres[i] = pres[i - 1];
    } else {
      pres[i] = pres[i - 1] * i % pp;
    }
  }
}
Pair split(int n, int p, int c, int pp) {
  int b = n / p;
  if (b == 0) {
    return Pair(pres[n], 0);
  } else {
    Pair pr = split(b, p, c, pp);
    return Pair((pr.s * pres[n % pp] % pp) * mpow(pres[pp], n / pp, pp) % pp,
                pr.k + b);
  }
}
void sov(int m, int n, int c) {
  tot = 0;
  for (int i = 2; i * i <= c; i++) {
    if (c % i == 0) {
      pp[tot] = i;
      cc[tot] = 0;
      ppp[tot] = 1;
      while (c % i == 0) {
        cc[tot]++;
        ppp[tot] *= pp[tot];
        c /= i;
      }
      tot++;
    }
  }
  if (c != 1) {
    pp[tot] = c;
    cc[tot] = 1;
    ppp[tot] = c;
    tot++;
    c = 1;
  }
  for (int i = 0; i < tot; i++) {
    init(pp[i], ppp[i]);
    Pair pn = split(n, pp[i], cc[i], ppp[i]);
    Pair pa = split(m, pp[i], cc[i], ppp[i]);
    Pair pb = split(n - m, pp[i], cc[i], ppp[i]);
    if (pn.k - pa.k - pb.k >= cc[i]) {
      aa[i] = 0;
      mm[i] = ppp[i];
    } else {
      aa[i] = pn.s * (inv(pa.s, ppp[i]) * inv(pb.s, ppp[i]) % ppp[i]) % ppp[i];
      for (int j = 0; j < pn.k - pa.k - pb.k; j++)
        aa[i] = (long long)aa[i] * pp[i] % ppp[i];
      mm[i] = ppp[i];
    }
  }
  int res = china(tot, aa, mm) - 1;
  if (res < 0) res += 1000003;
  cout << res << endl;
}
};  // namespace Task3
int main() {
  int x, y;
  scanf("%d %d", &x, &y);
  Task3::sov(y, x + y, 1000003);
  return 0;
}
