#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void chkmax(T& x, U y) {
  if (x < y) x = y;
}
template <typename T, typename U>
inline void chkmin(T& x, U y) {
  if (y < x) x = y;
}
const int MAXN = 222222;
const int MOD = 1e6 + 3;
int r[MAXN];
int main() {
  int n, m;
  cin >> n >> m;
  r[1] = 1;
  for (int i = 2; i <= m; i++) {
    r[i] = (long long)(MOD - r[MOD % i]) * (MOD / i) % MOD;
  }
  int ans = 1;
  for (int i = 1; i <= m; i++) {
    ans = (long long)ans * (n + m + 1 - i) % MOD;
    ans = (long long)ans * r[i] % MOD;
  }
  ans = (ans + MOD - 1) % MOD;
  cout << ans << endl;
  return 0;
}
