#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
int fac[2000005], rev[2000005];
int n, C;
const int mod = 1e6 + 3;
int ksm(int x, int y) {
  int sum = 1;
  for (; y; y >>= 1) {
    if (y & 1) sum = 1LL * sum * x % mod;
    x = 1LL * x * x % mod;
  }
  return sum;
}
int calc(int n, int m) {
  return 1LL * fac[n] * rev[m] % mod * rev[n - m] % mod;
}
int main() {
  scanf("%d %d", &n, &C);
  fac[0] = rev[0] = 1;
  for (int i = 1; i <= 1000000; i++) {
    fac[i] = 1LL * fac[i - 1] * i % mod;
    rev[i] = 1LL * rev[i - 1] * ksm(i, mod - 2) % mod;
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    ans += calc(i + C - 1, C - 1);
    ans %= mod;
  }
  printf("%d\n", ans);
  return 0;
}
