#include <bits/stdc++.h>
using namespace std;
int n, c;
long long f[1000001];
long long power(long long x, long long y) {
  if (y == 0) return 1;
  long long p = power(x, y / 2) % 1000003;
  p = (p * p) % 1000003;
  return (y % 2 == 0) ? p : (x * p) % 1000003;
}
long long inverse(long long x) { return power(x, 1000003 - 2); }
long long modmult(long long a, long long b) { return (a * b) % 1000003; }
long long bc(long long n, long long k) {
  return modmult(modmult(f[n], inverse(f[k])), inverse(f[n - k]));
}
int main() {
  cin >> n >> c;
  f[0] = 1;
  f[1] = 1;
  for (int i = 2; i <= 1000000; i++) f[i] = (f[i - 1] * i) % 1000003;
  long long res = 0;
  for (int i = 1; i <= n; i++) res = (res + bc(c + i - 1, c - 1)) % 1000003;
  cout << res << endl;
  return 0;
}
