#include <bits/stdc++.h>
using namespace std;
int GLL(long long& x) { return scanf("%lld", &x); }
int GI(int& x) { return scanf("%d", &x); }
long long mul(long long a, long long b) { return (a * b) % 1000003; }
void add(long long& a, long long b) {
  a += b;
  if (a >= 1000003) a -= 1000003;
}
const int MAXN = 1000003;
long long fac[MAXN], inv[MAXN], facinv[MAXN];
int n, c;
int main() {
  fac[0] = 1;
  for (int i = 1; i < MAXN; i++) fac[i] = mul(i, fac[i - 1]);
  inv[0] = inv[1] = 1;
  for (int i = 2; i < MAXN; i++)
    inv[i] = (1000003 - (1000003 / i) * inv[1000003 % i] % 1000003) % 1000003;
  facinv[0] = 1;
  for (int i = 1; i < MAXN; i++) facinv[i] = mul(inv[i], facinv[i - 1]);
  GI(n);
  GI(c);
  long long res = 0LL;
  for (int i = 1; i <= (int)(n); i++) {
    long long curr = 1LL;
    curr = mul(curr, fac[i + c - 1]);
    curr = mul(curr, facinv[c - 1]);
    curr = mul(curr, facinv[i]);
    add(res, curr);
  }
  cout << res << "\n";
  return 0;
}
