#include <bits/stdc++.h>
using namespace std;
queue<int> Q;
long long int n, c;
long long int modinv[600000];
long long int mod = 1e6 + 3;
long long int com(long long int x, long long int y) {
  return y == 0 ? 1 : (com(x - 1, y - 1) * x * modinv[y]) % mod;
}
int main(void) {
  scanf("%lld %lld", &n, &c);
  modinv[1] = 1;
  for (int i = 2; i <= 599999; i++) {
    modinv[i] = (modinv[mod % i] * (mod - mod / i)) % mod;
  }
  long long int ans = com(n + c, c);
  printf("%lld", ans - 1);
}
