#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = double;
const int mxn = 5e5 + 10;
const int inf = 1e9;
const int mod = 1e6 + 3;
int n, C;
ll fact[mxn], inv_fact[mxn];
ll powmod(ll a, ll b) {
  ll ret = 1;
  while (b) {
    if (b & 1ll) ret *= a, ret %= mod;
    a *= a;
    a %= mod;
    b >>= 1;
  }
  return ret;
}
void pre() {
  fact[0] = inv_fact[0] = 1;
  for (int i = 1; i < mxn; i++) {
    fact[i] = fact[i - 1] * i % mod;
    inv_fact[i] = powmod(fact[i], mod - 2);
  }
}
ll choose(ll n, ll k) {
  if (k > n or k < 0 or n < 0) return 0;
  return fact[n] * inv_fact[n - k] % mod * inv_fact[k] % mod;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  pre();
  cin >> n >> C;
  ll sum = 0;
  for (int i = 1; i <= C; i++) {
    sum += choose(n, i) * choose(C, i);
    sum %= mod;
  }
  cout << sum << '\n';
  return 0;
}
