#include <bits/stdc++.h>
const int N = 700005, mod = 1000003;
int n, c, ans;
int fac[N], inv[N];
int C(int m, int n) {
  if (m < n) return 0;
  return (long long)fac[m] * inv[n] % mod * inv[m - n] % mod;
}
int pow(int a, int k) {
  int res = 1;
  for (; k; k >>= 1, a = (long long)a * a % mod)
    if (k & 1) res = (long long)res * a % mod;
  return res;
}
void pre() {
  fac[0] = 1;
  for (int i = 1; i <= n; i++) fac[i] = (long long)fac[i - 1] * i % mod;
  inv[n] = pow(fac[n], mod - 2);
  for (int i = n; i >= 1; i--) inv[i - 1] = (long long)inv[i] * i % mod;
}
int main() {
  scanf("%d%d", &n, &c);
  n += c;
  pre();
  n -= c;
  for (int i = 1; i <= n; i++) ans = (ans + C(i + c - 1, c - 1)) % mod;
  printf("%d", ans);
  return 0;
}
