#include <bits/stdc++.h>
using namespace std;
long long n, k, p[2000000], rev[2000000], mod = 1e6 + 3;
long long exp(long long u, long long k) {
  long long tmp = 1;
  while (k) {
    if (k % 2) tmp = tmp * u, tmp %= mod;
    u *= u;
    u %= mod;
    k /= 2;
  }
  return tmp;
}
long long comb(int u, int v) {
  long long res = p[v];
  res *= rev[u];
  res %= mod;
  res *= rev[v - u];
  res %= mod;
  return res;
}
int main() {
  cin >> n >> k;
  p[0] = rev[0] = 1;
  for (long long i = 1; i < 2000000; i++) {
    p[i] = p[i - 1] * i;
    p[i] %= mod;
    rev[i] = exp(p[i], mod - 2);
  }
  int res = 0;
  for (int i = 1; i <= n; i++) {
    int k1 = k - 1, n1 = i + k - 1;
    res += comb(k1, n1);
    res %= mod;
  }
  cout << res;
}
