#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000003;
long long power(long long x, long long p) {
  if (p == 0) return 1;
  long long half = power(x, p / 2);
  long long res = (half * half) % MOD;
  if (p % 2 != 0) {
    res = (res * x) % MOD;
  }
  return res;
}
int main() {
  int n, C;
  scanf("%d %d", &n, &C);
  long long res = 1;
  for (long long i = n + 1; i <= n + C; ++i) {
    res = res * i;
    res %= MOD;
  }
  for (int i = 2; i <= C; ++i) {
    long long inv = power(i, MOD - 2);
    res = res * inv;
    res %= MOD;
  }
  res = (res + MOD - 1) % MOD;
  printf("%I64d\n", res);
  return 0;
}
