#include <bits/stdc++.h>
using namespace std;
int setBit(int n, int pos) { return n = n | (1 << pos); }
int resetBit(int n, int pos) { return n = n & ~(1 << pos); }
bool checkBit(long long n, long long pos) { return (bool)(n & (1LL << pos)); }
const int MOD = 1000003;
const int MAX = 1000010;
int inv[MAX], fact[MAX];
long long bm(long long a, long long b, long long m) {
  if (b == 0) return 1;
  long long ret = bm(a, b / 2, m);
  ret *= ret;
  ret %= MOD;
  if (b % 2 == 1) ret *= a;
  return (ret % m);
}
void precal(int N) {
  fact[0] = 1;
  for (int i = 1; i <= N; i++) fact[i] = ((long long)fact[i - 1] * i) % MOD;
  inv[N] = bm(fact[N], MOD - 2, MOD);
  for (int i = N - 1; i >= 0; i--)
    inv[i] = ((long long)inv[i + 1] * (i + 1)) % MOD;
}
int bin(int n, int r) {
  if (n < r) return 0;
  long long ret = fact[n];
  ret *= inv[r], ret %= MOD;
  ret *= inv[n - r], ret %= MOD;
  return ret;
}
int main() {
  precal(1e6);
  int n, k;
  scanf("%d %d", &n, &k);
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    ans += bin(k + i - 1, k - 1);
    if (ans >= MOD) ans -= MOD;
  }
  cout << ans << endl;
  return 0;
}
