#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265359;
const double EPS = 1e-9;
const long long INF = ((long long)1 << 62);
const long long P = 1e6 + 3;
long long fp(long long a, long long b) {
  if (b == 0)
    return 1;
  else {
    long long half = fp(a, b / 2);
    long long half_half = (half * half) % P;
    return (b % 2 == 0 ? half_half : (a * half_half) % P);
  }
}
long long bc(long long n, long long k) {
  long long r = 1;
  long long start = n - k + 1;
  long long top = 1;
  long long bottom = 1;
  long long res = 0;
  for (long long i = 1; i <= k; i++) {
    top = (top * start) % P;
    bottom = (bottom * i) % P;
    res = (res + top * fp(bottom, P - 2)) % P;
    start++;
  }
  return res;
}
int main() {
  std::ios::sync_with_stdio(false);
  long long n, k;
  cin >> n >> k;
  cout << bc(n + k - 1, n) << endl;
  return 0;
}
