#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:667772160")
using namespace std;
struct __isoff {
  __isoff() {
    if (0) freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
    srand('C' + 'T' + 'A' + 'C' + 'Y' + 'M' + 'B' + 'A');
  }
  ~__isoff() {}
} __osafwf;
const unsigned long long p1 = 31;
const unsigned long long p2 = 29;
const double eps = 1e-8;
const double pi = acos(-1.0);
const int infi = 1e9 + 7;
const long long inf = 1e18 + 7;
const long long dd = 7e5 + 7;
const long long mod = 1e9 + 7;
const long long mod2 = 1e6 + 3;
long long fac[dd], ifac[dd];
long long pows(long long x, int p) {
  if (p == 0) return 1;
  if (p % 2) return pows(x, p - 1) * x % mod2;
  x = pows(x, p / 2);
  return x * x % mod2;
}
long long cnk(long long a, long long b) {
  return fac[a] * ifac[b] % mod2 * ifac[a - b] % mod2;
}
int main() {
  fac[0] = ifac[0] = 1;
  for (int i = 1; i < dd; i++) {
    fac[i] = fac[i - 1] * i % mod2;
    ifac[i] = ifac[i - 1] * pows(i, mod2 - 2) % mod2;
  }
  int n, c;
  cin >> n >> c;
  long long res = 0;
  for (long long i = (long long)1; i < (long long)n + 1; i++) {
    res = (res + cnk(i + c - 1, i)) % mod2;
  }
  cout << res;
}
