#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000 + 3;
int powmod(int a, int b, int c) {
  if (b == 0) return 1;
  int ret = powmod(a, b / 2, c);
  ret = (long long)ret * ret % c;
  if (b % 2) ret = (long long)ret * a % c;
  return ret;
}
int phi(int v) { return powmod(v, MOD - 2, MOD); }
int main() {
  int n, c;
  cin >> n >> c;
  int ans = 1;
  for (int i = 1; i < (c + 1); ++i) {
    ans = (long long)ans * (n + c - i + 1) % MOD * phi(i) % MOD;
  }
  cout << (ans - 1 + MOD) % MOD << endl;
  return 0;
}
