#include <bits/stdc++.h>
using namespace std;
long long mod = 1000003;
long long fact[800001], factinv[800001];
long long power(long long a, long long n) {
  long long ans = 1;
  long long cur = a;
  while (n) {
    if (n % 2) ans = (ans * cur) % mod;
    n /= 2;
    cur = (cur * cur) % mod;
  }
  return ans;
}
int main() {
  long long n, m, i, temp;
  long long ans = 0;
  cin >> n >> m;
  fact[0] = 1;
  for (i = 1; i < 800001; i++) fact[i] = (fact[i - 1] * i) % mod;
  factinv[800000] = power(fact[800000], mod - 2);
  for (i = 799999; i >= 0; i--) factinv[i] = (factinv[i + 1] * (i + 1)) % mod;
  for (i = 1; i <= n; i++) {
    temp = (factinv[i] * factinv[m - 1]) % mod;
    temp = (temp * fact[i + m - 1]) % mod;
    ans = (ans + temp) % mod;
  }
  cout << ans << endl;
  return 0;
}
