#include <bits/stdc++.h>
using namespace std;
const long long N = 5e5 + 10, mod = 1e6 + 3;
long long inv[N * 2], fac[N * 2], ans[N];
long long qpow(long long x, long long y) {
  long long res = 1;
  while (y) {
    if (y & 1) res = res * x % mod;
    y >>= 1;
    x = x * x % mod;
  }
  return res;
}
long long C(long long n, long long m) {
  if (m > n - m) m = n - m;
  return fac[n] * inv[m] % mod * inv[n - m] % mod;
}
signed main() {
  fac[0] = inv[0] = 1;
  for (long long i = 1; i < N * 2; i++)
    fac[i] = fac[i - 1] * i % mod, inv[i] = qpow(fac[i], mod - 2);
  long long n, c;
  scanf("%lld%lld", &n, &c);
  for (long long i = 1; i <= n; i++)
    ans[i] = (ans[i - 1] + C(i + c - 1, c - 1)) % mod;
  printf("%lld", ans[n]);
  return 0;
}
