#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000003;
long long inv[MOD];
long long fact(int x) {
  long long ans = 1;
  for (long long i = 1; i <= x; i++) ans = (ans * i) % MOD;
  return ans;
}
long long ifact(int x) {
  long long ans = 1;
  for (long long i = 1; i <= x; i++) ans = (ans * inv[i % MOD]) % MOD;
  return ans;
}
long long C(long long x, long long y) {
  long long ans = (fact(x) * ifact(y)) % MOD;
  ans = (ans * ifact(x - y)) % MOD;
  return ans;
}
int main() {
  inv[1] = 1;
  for (long long i = 2; i < MOD; ++i)
    inv[i] = (MOD - (MOD / i) * inv[MOD % i] % MOD) % MOD;
  int a, b;
  scanf("%d %d", &a, &b);
  int ans = C(a + b, b) + MOD - 1;
  printf("%d\n", ans % MOD);
}
