#include <bits/stdc++.h>
using namespace std;
int fact[700005], inv[700005], factinv[700005];
int main() {
  int n, c;
  cin >> n >> c;
  fact[1] = inv[1] = factinv[1] = 1;
  fact[0] = inv[0] = factinv[0] = 1;
  for (int i = 2; i <= 700000; i++) {
    fact[i] = (i * 1LL * fact[i - 1]) % 1000003;
    inv[i] = (1000003 - (((1000003 / i) * 1LL * inv[1000003 % i]) % 1000003)) %
             1000003;
    factinv[i] = (inv[i] * 1LL * factinv[i - 1]) % 1000003;
  }
  int res = 0;
  for (int i = 1; i <= n; i++) {
    int tmp = (fact[i + c - 1] * 1LL * factinv[i]) % 1000003;
    tmp = (tmp * 1LL * factinv[c - 1]) % 1000003;
    res += tmp;
    if (res >= 1000003) res -= 1000003;
  }
  cout << res;
  return 0;
}
