#include <bits/stdc++.h>
using namespace std;
const int mod = int(1e6) + 3;
long long f[mod];
long long f1[mod];
int powmod(long long a, int n) {
  long long res = 1;
  while (n) {
    if (n & 1) {
      res = (res * a) % mod;
    }
    n /= 2;
    a = (a * a) % mod;
  }
  return res;
}
int main() {
  f[0] = 1;
  for (int i = 1; i < mod; i++) f[i] = (f[i - 1] * i) % mod;
  f1[mod - 1] = powmod(f[mod - 1], mod - 2);
  for (int i = mod - 2; i >= 0; i--) f1[i] = (f1[i + 1] * (i + 1)) % mod;
  int nn, c;
  cin >> nn >> c;
  c--;
  long long re = 0;
  for (int n = 1; n <= nn; n++) {
    long long res = f[n + c] * f1[n];
    res %= mod;
    res *= f1[c];
    res %= mod;
    re = (res + re) % mod;
  }
  cout << re << endl;
  return 0;
}
