#include <bits/stdc++.h>
int main() {
  int n, c, i, m = 1000 * 1000 + 3;
  std::cin >> n >> c;
  long long a = 1, b = 1, b1 = 1;
  for (i = 1; i <= c; i++) a = (a * (n + i)) % m, b = (b * i) % m;
  for (i = 1; i <= m - 2; i++) b1 = (b1 * b) % m;
  std::cout << a * b1 % m - 1;
  return 0;
}
