#include <bits/stdc++.h>
using namespace std;
const int module = 1000003;
long long inv(long long x, int p) {
  long long ret = 1;
  while (p) {
    if (p & 1) {
      ret = (ret * x) % module;
    }
    x = x * x % module;
    p /= 2;
  }
  return ret;
}
int main() {
  int n, c;
  cin >> n >> c;
  long long ans, div;
  ans = div = 1;
  for (int i = n + 1; i <= n + c; i++) {
    ans = ans * i % module;
    div = div * (i - n) % module;
  }
  div = inv(div, module - 2);
  ans = ans * div % module;
  ans = (ans + module - 1) % module;
  cout << ans << endl;
  return 0;
}
