#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000003;
long long n, c;
long long Pow(long long x, long long y) {
  long long res = 1, z = x;
  while (y) {
    if (y % 2) res = res * z % MOD;
    z = z * z % MOD;
    y >>= 1;
  }
  return res;
}
int main() {
  cin >> n >> c;
  n += c;
  long long res = 1;
  for (long long i = n - c + 1; i <= n; i++) res = res * i % MOD;
  for (long long i = 2; i <= c; i++) res = res * Pow(i, MOD - 2) % MOD;
  cout << res - 1 << endl;
}
