#include <bits/stdc++.h>
using namespace std;
long long n, c;
long long P = 1e6 + 3;
long long rexp(long long& a, long long n) {
  if (n <= 0) {
    return 1;
  } else {
    long long aux = rexp(a, n / 2) % P;
    if (n % 2 == 0) {
      return (aux * aux) % P;
    } else {
      return (((a * aux) % P) * aux) % P;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  ifstream in("input.txt");
  cin >> n >> c;
  long long fact = 1;
  for (int i = 1; i <= c; i++) {
    fact = (fact * i) % P;
  }
  long long num = 1;
  for (int i = 1; i <= c; i++) {
    num = (num * (n + i)) % P;
  }
  long long aux = rexp(fact, P - 2);
  cout << (num * aux - 1) % P;
}
