#include <bits/stdc++.h>
using namespace std;
const int mod = 1e6 + 3, mxN = 7e5;
int f[mxN];
int add(int a, int b) {
  a += b;
  if (a >= mod) a -= mod;
  return a;
}
int mul(long long a, long long b) {
  a *= b;
  if (a >= mod) a %= mod;
  return a;
}
int binpow(int a, int b) {
  int res = 1;
  while (b) {
    if ((b & 1)) res = mul(res, a);
    a = mul(a, a);
    b >>= 1;
  }
  return res;
}
int C(int n, int k) {
  int res = mul(f[n], binpow(mul(f[k], f[n - k]), mod - 2));
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m, ans = 0;
  cin >> n >> m;
  f[0] = 1;
  for (int i = 1; i <= n + m - 1; i++) {
    f[i] = mul(f[i - 1], i);
  }
  for (int i = 1; i <= n; i++) {
    ans = add(ans, C(i + m - 1, i));
  }
  cout << ans;
  return 0;
}
