#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:256000000")
using namespace std;
mt19937 ggen;
const int MOD = 1000003;
inline long long add(long long a, long long b, long long m = MOD) {
  long long res = a + b;
  if (res >= m) res -= m;
  return res;
}
inline long long sub(long long a, long long b, long long m = MOD) {
  long long res = a - b;
  if (res < 0) res += m;
  return res;
}
inline long long mul(long long a, long long b, long long m = MOD) {
  return (a * b) % m;
}
inline long long binpow(long long a, long long p, long long m = MOD) {
  if (m == 1) return 0;
  long long res = 1;
  while (p) {
    if (p & 1) res = mul(res, a, m);
    a = mul(a, a, m);
    p >>= 1;
  }
  return res;
}
inline long long obr(long long a, long long m = MOD) {
  return binpow(a, m - 2, m);
}
int fact[1000010];
int rfact[1000010];
void precalc() {
  fact[0] = 1;
  rfact[0] = 1;
  for (int i = 1; i < 1000010; i++) {
    fact[i] = mul(fact[i - 1], i);
    rfact[i] = obr(fact[i]);
  }
}
inline long long comb(int n, int k) {
  if (n < k) return 0;
  return mul(fact[n], mul(rfact[k], rfact[n - k]));
}
int n, c;
void solve() {
  precalc();
  cin >> n >> c;
  cout << sub(comb(n + c, c), 1);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  srand(1313);
  ggen = mt19937(13);
  solve();
  return 0;
}
