#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000003;
long long ret = 0;
vector<long long> fact(700001), inv(1000003);
int main(int argc, char const *argv[]) {
  int n, c;
  cin >> n >> c;
  fact[0] = inv[1] = 1;
  for (int i = 1; i <= n + c; i++) fact[i] = (fact[i - 1] * i) % mod;
  for (int i = 2; i <= 1000003; i++)
    inv[i] = (-(mod / i) * inv[mod % i]) % mod + mod;
  for (int i = 1; i <= n; i++) {
    ret = (ret + fact[i + c - 1] * inv[fact[i]] * inv[fact[c - 1]]) % mod;
  }
  cout << ret << endl;
}
