#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cout << *it << " = " << a << "\n";
  err(++it, args...);
}
const long long N = 7e5 + 5, M = 1e6 + 3, inf = 1e18;
long long fct[N];
void fact() {
  fct[0] = 1;
  for (int i = 1; i < N; i++) fct[i] = fct[i - 1] * i % M;
}
long long pw(long long x, long long y) {
  long long res = 1;
  while (y) {
    if (y & 1) res = res * x % M;
    x = x * x % M;
    y >>= 1;
  }
  return res;
}
long long C(long long n, long long r) {
  return fct[n] * pw(fct[r] * fct[n - r] % M, M - 2) % M;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  fact();
  long long n, c;
  cin >> n >> c;
  long long ans = 0;
  for (int i = 1; i < n + 1; i++) {
    ans = (ans + C(i + c - 1, c - 1)) % M;
  }
  cout << ans << "\n";
}
