#include <bits/stdc++.h>
using namespace std;
const long long m = 1000003;
long long n, c, d = 1, d2 = 1, b = 1;
int main() {
  scanf("%I64d %I64d", &n, &c);
  if (c == 1) {
    printf("%I64d", n);
    return 0;
  }
  if (n == 1) {
    printf("%I64d", c);
    return 0;
  }
  for (int i = 1; i <= c; i++) d = d * i % m;
  for (int i = 1; i < 1000002; i++) d2 = d2 * d % m;
  for (int i = n + 1; i <= n + c; i++) b = b * i % m;
  b = b * d2 % m;
  printf("%I64d", b - 1);
  return 0;
}
