#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> extendedEuclid(long long a, long long b) {
  long long x = 0ll, lastx = 1ll;
  long long y = 1ll, lasty = 0ll;
  long long tmp;
  while (b != 0ll) {
    long long quotient = a / b;
    tmp = a;
    a = b;
    b = tmp % b;
    tmp = x;
    x = lastx - quotient * x;
    lastx = tmp;
    tmp = y;
    y = lasty - quotient * y;
    lasty = tmp;
  }
  return make_pair(lastx, lasty);
}
long long inv(long long a, long long m) {
  pair<long long, long long> res = extendedEuclid(a, m);
  return ((res.first % m) + m) % m;
}
long long f[800000];
int main() {
  long long n;
  long long c;
  cin >> n >> c;
  c--;
  f[0] = 1;
  for (long long i = 1; i <= n + c; i++) {
    f[i] = (f[i - 1] * i) % 1000003;
  }
  long long num, den;
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    num = (f[i + c]) % 1000003;
    den = inv((f[i] * f[c]) % 1000003, 1000003);
    ans += ((num * den) % 1000003);
    ans %= 1000003;
  }
  cout << ans << endl;
}
