#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
template <class T, class U>
inline void Max(T &a, U b) {
  if (a < b) a = b;
}
template <class T, class U>
inline void Min(T &a, U b) {
  if (a > b) a = b;
}
inline void add(int &a, int b) {
  a += b;
  while (a >= 1000003) a -= 1000003;
}
int pow(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = ans * (long long)a % 1000003;
    a = (long long)a * a % 1000003;
    b >>= 1;
  }
  return ans;
}
int f[700005], inv[700005], M;
int main() {
  int T = 100, j, k, i, ca = 0, m, n;
  scanf("%d%d", &n, &m);
  M = n + m;
  f[0] = 1;
  for (int i = 1; i < M; i++) f[i] = f[i - 1] * (long long)i % 1000003;
  inv[M - 1] = pow(f[M - 1], 1000003 - 2);
  for (int i = M - 1 - 1; i >= 0; i--)
    inv[i] = inv[i + 1] * (long long)(i + 1) % 1000003;
  long long ans = 0;
  for (int i = 1; i < n + 1; i++) {
    ans += 1LL * f[i + m - 1] * inv[i] % 1000003;
  }
  ans %= 1000003;
  printf("%d\n", ans * inv[m - 1] % 1000003);
  return 0;
}
