#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e6 + 3;
long long n, c;
long long fac[1000010], inv[1000010], facinv[1000010];
long long C(long long n, long long k) {
  if (k < 0 || k > n || n < 0) return 0;
  if (k == n || k == 0) return 1;
  return fac[n] * facinv[k] % mod * facinv[n - k] % mod;
}
int main() {
  fac[0] = 1;
  for (int i = 1; i <= 1000000; i++) fac[i] = fac[i - 1] * i % mod;
  inv[1] = 1;
  for (int i = 2; i <= 1000000; i++)
    inv[i] = (mod - mod / i) * inv[mod % i] % mod;
  facinv[0] = 1;
  for (int i = 1; i <= 1000000; i++) facinv[i] = facinv[i - 1] * inv[i] % mod;
  cin >> n >> c;
  long long ans = 0;
  for (int i = 1; i <= c; i++) {
    ans += C(n + i - 1, i);
    ans %= mod;
  }
  cout << ans << endl;
  return 0;
}
