#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000003;
long long fast_exp(long long a, long long b) {
  long long res = 1;
  long long cur = a;
  while (b > 0) {
    if (b % 2 == 1) {
      res = (res * cur) % MOD;
    }
    b /= 2;
    cur = (cur * cur) % MOD;
  }
  return res;
}
long long inv(long long a) { return fast_exp(a, MOD - 2); }
long long choose(long long a, long long b) {
  long long res = 1;
  for (long long i = 1; i <= a; i++) {
    res = (res * i) % MOD;
  }
  for (long long i = 1; i <= b; i++) {
    res = (res * inv(i)) % MOD;
  }
  for (long long i = 1; i <= a - b; i++) {
    res = (res * inv(i)) % MOD;
  }
  return res;
}
int main() {
  long long s = 0;
  long long n, c;
  cin >> n >> c;
  cout << choose(n + c, n) - 1 << endl;
}
