#include <bits/stdc++.h>
using namespace std;
long long fact[1000000], ifact[1000000];
long long modulo_inverse(long long n) {
  long long t = 1000003 - 2, p = 1, q = n;
  while (t > 0) {
    if (t % 2) p = (p * q) % 1000003;
    q = (q * q) % 1000003;
    t /= 2;
  }
  return p % 1000003;
}
long long combination(long long n, long long r) {
  return (((fact[n] * ifact[r]) % 1000003) * ifact[n - r]) % 1000003;
}
int main(void) {
  long long N, C;
  cin >> N >> C;
  fact[0] = 1;
  for (long long i = ((long long)1); i < ((long long)1000000); i++)
    fact[i] = (fact[i - 1] * i) % 1000003;
  for (long long i = ((long long)0); i < ((long long)1000000); i++)
    ifact[i] = modulo_inverse(fact[i]);
  long long ans = 0;
  for (long long i = ((long long)1); i < ((long long)N + 1); i++)
    ans = (ans + combination(i + C - 1, C - 1)) % 1000003;
  cout << ans << endl;
}
