#include <bits/stdc++.h>
const int INF = 0x3f3f3f3f;
const int maxn = 1e6 + 50;
const int mod = 1e6 + 3;
using namespace std;
long long fac[maxn];
void init(int n) {
  fac[0] = 1;
  for (int i = 1; i < n; i++) {
    fac[i] = fac[i - 1] * i % mod;
  }
}
long long qPow(long long n, long long k, long long mod) {
  long long ret = 1;
  while (k) {
    if (k & 1) {
      ret = (ret * n) % mod;
    }
    n = n * n % mod;
    k >>= 1;
  }
  return ret;
}
long long lucas(long long n, long long k, long long mod) {
  long long ret = 1;
  while (n && k) {
    long long np = n % mod, kp = k % mod;
    if (np < kp) return 0;
    ret = (ret * fac[np] % mod) *
          qPow(fac[kp] * fac[np - kp] % mod, mod - 2, mod) % mod;
    n /= mod;
    k /= mod;
  }
  return ret;
}
int main() {
  init(maxn);
  int n, m;
  while (scanf("%d %d", &n, &m) != EOF) {
    printf("%I64d\n", (lucas(n + m, n, mod) + mod - 1) % mod);
  }
  return 0;
}
