#include <bits/stdc++.h>
using namespace std;
int n, c;
int f[700001];
int powm(int x, int a) {
  if (a == 0) {
    return 1;
  } else {
    if (a % 2 == 1) {
      return (1LL * powm(x, a - 1) * x) % 1000003;
    } else {
      int g = powm(x, a / 2);
      return (1LL * g * g) % 1000003;
    }
  }
}
int cnk(int nn, int kk) {
  return (1LL * ((1LL * f[nn] * powm(f[kk], 1000003 - 2)) % 1000003) *
          powm(f[nn - kk], 1000003 - 2)) %
         1000003;
}
int main() {
  cin >> n >> c;
  for (int i = 0; i <= n + c; i++) {
    if (i == 0) {
      f[i] = 1;
    } else {
      f[i] = (1LL * f[i - 1] * i) % 1000003;
    }
  }
  int ans = 0;
  for (int n1 = 1; n1 <= n; n1++) {
    ans += cnk(n1 + c - 1, c - 1);
    ans %= 1000003;
  }
  cout << ans << endl;
  return 0;
}
