#include <bits/stdc++.h>
using namespace std;
long long int po(long long int a, long long int b) {
  long long int re = 1;
  while (b) {
    if (b % 2) re = (re * a) % 1000003;
    a = (a * a) % 1000003;
    b /= 2;
  }
  return re;
}
long long int fac[700010], fi[700010];
int main() {
  ios_base::sync_with_stdio(false);
  int n, c;
  long long int temp, ans = 0;
  cin >> n >> c;
  fac[0] = fi[0] = 1;
  for (int i = 1; i < n + c; i++) {
    fac[i] = (fac[i - 1] * i) % 1000003;
    fi[i] = (fi[i - 1] * po(i, 1000003 - 2)) % 1000003;
  }
  for (int i = 1; i <= n; i++) {
    temp = (fac[i + c - 1] * fi[i]) % 1000003;
    temp = (temp * fi[c - 1]) % 1000003;
    ans = (ans + temp) % 1000003;
  }
  cout << ans << "\n";
  return 0;
}
