#include <bits/stdc++.h>
using namespace std;
string world[8] = {"U", "D", "R", "L", "UL", "UR", "DR", "DL"};
const int rx[8] = {-1, 1, 0, 0, -1, -1, 1, 1};
const int ry[8] = {0, 0, 1, -1, -1, 1, 1, -1};
long long mod = 1000000 + 3;
long long binpow(long long a, long long n) {
  long long res = 1;
  while (n)
    if (n & 1) {
      res *= a;
      res %= mod;
      --n;
    } else {
      a *= a;
      a %= mod;
      n >>= 1;
    }
  return res;
}
long long pw1[1000001];
long long pw[1000001];
int main() {
  int n, m;
  cin >> n >> m;
  pw[0] = 1;
  for (int i = 1; i <= 1000000; i++) {
    pw[i] = pw[i - 1];
    pw[i] *= 1ll * i;
    pw[i] %= mod;
  }
  pw1[0] = 1;
  for (int i = 1; i <= 1000000; i++) {
    pw1[i] = pw1[i - 1];
    pw1[i] *= 1ll * binpow(i, mod - 2);
    pw1[i] %= mod;
  }
  pw1[0] = 1;
  pw[0] = 1;
  long long ans = 0;
  ans = pw[n + m];
  ans *= pw1[m];
  ans %= mod;
  ans *= pw1[n];
  ans %= mod;
  ans -= 1;
  ans += mod;
  ans %= mod;
  cout << ans << endl;
  return 0;
}
