#include <bits/stdc++.h>
using namespace std;
long long int am[1000006], md = 1000003, n, c, res, k;
void cal() {
  am[0] = am[1] = 1;
  for (long long int r = 2; r <= 1000000; r++)
    am[r] = (am[r - 1] % md) * (r % md) % md;
}
long long int por(long long int x, long long int y) {
  if (y == 0) return 1;
  if (y == 1) return x % md;
  long long int e = por(x, y / 2);
  e = (e % md) * (e % md) % md;
  if (y % 2 != 0) e = (e % md) * (x % md) % md;
  return e;
}
int main() {
  cin >> n >> c;
  cal();
  for (long long int i = 1; i <= n; i++) {
    k = (am[c - 1] * am[i]) % md;
    k = por(k, md - 2);
    k = am[i + c - 1] * k;
    k %= md;
    res = ((res % md) + (k % md)) % md;
  }
  cout << res << endl;
  return 0;
}
