#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000003;
long long fac[MOD + 5], inv[MOD + 5];
void gcd(int a, int b, int &g, int &x, int &y) {
  if (!b) {
    g = a;
    x = 1;
    y = 0;
  } else {
    gcd(b, a % b, g, y, x);
    y -= x * (a / b);
  }
}
long long inverse(int n) {
  int g, x, y;
  gcd(n, MOD, g, x, y);
  return (x + MOD) % MOD;
}
void ready() {
  fac[0] = 1;
  for (int i = 1; i < MOD; i++) fac[i] = fac[i - 1] * i % MOD;
  inv[MOD - 1] = inverse(fac[MOD - 1]);
  for (int i = MOD - 2; i >= 0; i--) inv[i] = inv[i + 1] * (i + 1) % MOD;
}
long long C(int n, int m) { return fac[n] * inv[m] % MOD * inv[n - m] % MOD; }
void work() {
  int N, M;
  scanf("%d%d", &N, &M);
  cout << (C(N + M, M) - 1 + MOD) % MOD << endl;
}
int main() {
  ready();
  work();
  return 0;
}
