#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e6 + 3;
template <int SZ, int64_t MOD>
struct cmb {
  int64_t fact[SZ] = {1}, inv[SZ] = {0};
  int64_t m;
  cmb() {
    m = MOD;
    go();
  }
  int64_t fpow(int64_t a, int64_t b) {
    int64_t res = 1;
    while (b) {
      if (b & 1) res = (res * a) % m;
      a = (a * a) % m;
      b >>= 1;
    }
    return res;
  }
  void go() {
    for (int i = 1; i < SZ; i++) fact[i] = 1ll * i * fact[i - 1] % m;
    inv[SZ - 1] = fpow(fact[SZ - 1], MOD - 2);
    for (int i = SZ - 2; i >= 0; i--) inv[i] = 1ll * (i + 1) * inv[i + 1] % m;
  }
  int64_t c(int n, int r) {
    if (n < r || r < 0) return 0;
    return (fact[n] * inv[r] % m * inv[n - r] % m) % m;
  }
  int64_t p(int n, int r) {
    if (n < r || r < 0 || n < 0) return 0;
    return fact[n] * inv[n - r] % m;
  }
};
cmb<MOD, MOD> cm;
int main() {
  cin.tie(0)->sync_with_stdio(0);
  int n, c;
  cin >> n >> c;
  cout << (cm.c(n + c, c) - 1 + MOD) % MOD << "\n";
}
