#include <bits/stdc++.h>
using namespace std;
const long long m = 1e6 + 3;
long long gcd(long long a, long long b, long long& x, long long& y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  long long x1, y1;
  long long g = gcd(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return g;
}
long long inverse(long long a) {
  long long x, y, g;
  g = gcd(a, m, x, y);
  return (x % m + m) % m;
}
long long C(long long n, long long k) {
  long long res = 1;
  for (int i = 1; i <= k; ++i) {
    res = (res * (n - k + i)) % m;
    res = (res * inverse(i)) % m;
  }
  return res;
}
int main() {
  long long n, c, ans = 1;
  cin >> n >> c;
  cout << (C(c + n, c) - 1 + m) % m;
}
