#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const int MOD = int(1e6) + 3;
inline int add(const int a, const int b, const int mod = MOD) {
  return (a + b >= mod) ? (a + b - mod) : (a + b);
}
inline int sub(const int a, const int b, const int mod = MOD) {
  return (a - b < 0) ? (a - b + mod) : (a - b);
}
inline void inc(int &a, const int b, const int mod = MOD) {
  a = add(a, b, mod);
}
inline int negate(const int a, const int mod = MOD) { return mod - a; }
inline int mul(const int a, const int b, const int mod = MOD) {
  return (a * 1ll * b) % mod;
}
int binPow(int b, int p, const int mod = MOD) {
  int r = 1;
  while (p) {
    if (p & 1) r = mul(r, b, mod);
    b = mul(b, b, mod);
    p >>= 1;
  }
  return r;
}
int inv(const int a, const int mod = MOD) {
  int res = binPow(a, mod - 2, mod);
  return res;
}
inline int dvd(const int a, const int b, const int mod = MOD) {
  return mul(a, inv(b, mod), mod);
}
inline int convert(int x, const int mod = MOD) {
  int tx = x % mod + mod;
  return tx > mod ? tx - mod : tx;
};
struct mNum {
  int x;
  mNum(int _x) : x(convert(_x)) {}
  mNum(long long _x) : x(convert(_x)) {}
};
mNum operator+(mNum a, mNum b) { return mNum(add(a.x, b.x)); }
mNum operator-(mNum a, mNum b) { return mNum(sub(a.x, b.x)); }
mNum operator*(mNum a, mNum b) { return mNum(mul(a.x, b.x)); }
mNum operator/(mNum a, mNum b) { return mNum(dvd(a.x, b.x)); }
mNum operator+(long long x, mNum b) { return mNum(add(convert(x), b.x)); }
mNum operator-(long long x, mNum b) { return mNum(sub(convert(x), b.x)); }
mNum operator*(long long x, mNum b) { return mNum(mul(convert(x), b.x)); }
mNum operator/(long long x, mNum b) { return mNum(dvd(convert(x), b.x)); }
mNum operator+(mNum a, long long x) { return mNum(add(a.x, convert(x))); }
mNum operator-(mNum a, long long x) { return mNum(sub(a.x, convert(x))); }
mNum operator*(mNum a, long long x) { return mNum(mul(a.x, convert(x))); }
mNum operator/(mNum a, long long x) { return mNum(dvd(a.x, convert(x))); }
const int MAX = 1e6 + 100;
int n, c;
int f[MAX], rf[MAX];
void precalc() {
  f[0] = 1;
  for (int i = 1; i < MAX; i++) f[i] = mul(f[i - 1], i);
  for (int i = 0; i < MAX; i++) rf[i] = inv(f[i]);
}
int C(int n, int k) {
  if (k < 0 || k > n) return 0;
  return mul(f[n], mul(rf[n - k], rf[k]));
}
void clear() {}
void solve() {
  int res = 0;
  for (int tn = 1; tn <= n; tn++) {
    int tmp = C(tn + c - 1, c - 1);
    res = add(res, tmp);
  }
  printf("%d\n", res);
}
int main() {
  precalc();
  while (scanf("%d%d", &n, &c) == 2) {
    clear();
    solve();
    return 0;
  }
  return 0;
}
