#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000003;
vector<long long> factorial(700000);
long long pow(long long a, long long b) {
  long long res = 1;
  for (; b > 0; b >>= 1) {
    if (b & 1) {
      res = res * a % MOD;
    }
    a = a * a % MOD;
  }
  return res;
}
long long choose(long long n, long long k) {
  return factorial[n] * pow(factorial[k] * factorial[n - k] % MOD, MOD - 2) %
         MOD;
}
int main() {
  ios_base::sync_with_stdio(false);
  factorial[0] = 1;
  for (int i = 1; i < 700000; ++i) {
    factorial[i] = factorial[i - 1] * i % MOD;
  }
  int n, c;
  cin >> n >> c;
  long long sum = 0;
  for (int i = 1; i <= n; ++i) {
    sum = (sum + choose(c + i - 1, i)) % MOD;
  }
  cout << sum << endl;
}
