#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
const int N = 1e6 + 7;
const int M = 1e6 + 7;
const long long mod = 1e6 + 3;
long long fact[N];
long long power(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return ans;
}
long long C(int n, int m) {
  long long k = fact[m] * fact[n - m] % mod;
  k = power(k, mod - 2);
  long long ans = fact[n] * k % mod;
  return ans;
}
signed main() {
  fact[0] = 1;
  for (int i = 1; i <= 1000000; i++) fact[i] = fact[i - 1] * i % mod;
  int n, c;
  cin >> n >> c;
  long long ans = 0;
  for (int i = 1; i <= n; i++) ans = (ans + C(i + c - 1, c - 1)) % mod;
  cout << ans << endl;
  return 0;
}
