#include <bits/stdc++.h>
using namespace std;
long long mod = 1e6 + 3;
long long power(long long x, long long p) {
  long long r = 1;
  while (p) {
    if (p % 2) r = (r * x) % mod;
    p /= 2;
    x = (x * x) % mod;
  }
  return r;
}
long long f(long long x) {
  long long r = 1;
  while (x) r = (r * x--) % mod;
  return r;
}
int main() {
  long long n, c;
  cin >> n >> c;
  long long r = 0;
  cout << ((f(n + c) * (power(f(n), mod - 2))) % mod * (power(f(c), mod - 2)) +
           mod - 1) %
              mod;
}
