#include <bits/stdc++.h>
using namespace std;
int F[1000003], G[1000003], f[1000003];
int Po(int a, int b) {
  int rlt = 1;
  while (b) {
    if (b & 1) rlt = 1ll * rlt * a % 1000003;
    b >>= 1;
    a = 1ll * a * a % 1000003;
  }
  return rlt;
}
int main() {
  int n, C;
  scanf("%d%d", &n, &C);
  F[0] = 1;
  int m = n * 2;
  for (int i = 1; i <= m; i++) F[i] = 1ll * F[i - 1] * i % 1000003;
  G[m] = Po(F[m], 1000003 - 2);
  for (int i = m - 1; i >= 0; i--) G[i] = 1ll * G[i + 1] * (i + 1) % 1000003;
  int ans = 0;
  for (int i = 1; i <= n && i <= C; i++) {
    ans += 1ll * F[C] * G[i] % 1000003 * G[C - i] % 1000003 * F[n] % 1000003 *
           G[i] % 1000003 * G[n - i] % 1000003;
    if (ans >= 1000003) ans -= 1000003;
  }
  printf("%d\n", ans);
  return 0;
}
