#include <bits/stdc++.h>
using namespace std;
int exgcd(int a, int b, int &x, int &y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  int gcd = exgcd(b, a % b, x, y);
  int tmp = x;
  x = y;
  y = tmp - (a / b) * y;
  return gcd;
}
int quick_inverse(int n, int p) {
  int ret = 1;
  int exponent = p - 2;
  for (int i = exponent; i; i >>= 1, n = n * n % p) {
    if (i & 1) {
      ret = ret * n % p;
    }
  }
  return ret;
}
const int N = 500010;
const int mod = 1e6 + 3;
int invf[N], factor[N];
void get_factorial_inverse(int n, int p) {
  factor[0] = 1;
  for (int i = 1; i <= n; ++i) {
    factor[i] = i * factor[i - 1] % p;
  }
  invf[n] = quick_inverse(factor[n], p);
  for (int i = n - 1; i >= 0; --i) {
    invf[i] = invf[i + 1] * (i + 1) % p;
  }
}
long long f(int n, int r) {
  long long ans = 1;
  for (long long i = n; i >= n - r + 1; i--) {
    ans = ans * i % mod;
  }
  int x, y;
  for (int i = 1; i <= r; i++) {
    exgcd(i, mod, x, y);
    ans = ans * x % mod;
  }
  return ans;
}
int main() {
  int n, c;
  scanf("%d%d", &n, &c);
  cout << ((f(n + c, n) - 1) % mod + mod) % mod << endl;
}
