#include <bits/stdc++.h>
using namespace std;
long long n, k;
long long fac[1000007];
long long inv[1000007];
long long fastpow(long long a, long long x) {
  long long r = 1;
  while (x != 0) {
    if (x % 2 == 0) {
      a = (a * a) % 1000003;
      x /= 2;
    } else {
      r = (r * a) % 1000003;
      x--;
    }
  }
  return r;
}
void input() { cin >> n >> k; }
void solve() {
  fac[0] = 1;
  int i;
  for (i = 1; i <= 1000000; i++) {
    fac[i] = (i * fac[i - 1]) % 1000003;
  }
  long long ans = 0;
  for (i = 1; i <= k; i++) {
    long long cur = 1;
    cur *= fac[n + i - 1];
    cur %= 1000003;
    long long inv = (fac[i] * fac[(n - 1)]) % 1000003;
    cur *= fastpow(inv, 1000003 - 2);
    cur %= 1000003;
    ans += cur;
    ans %= 1000003;
  }
  cout << ans << "\n";
}
int main() {
  input();
  solve();
  return 0;
}
