#include <bits/stdc++.h>
using namespace std;
int vis[5];
int m[107][107];
const int mod = 1e6 + 3;
long long n, c, x = 1, y = 1, z = 1;
int main() {
  cin >> n >> c;
  for (long long i = c + 1; i <= c + n; i++) {
    x *= i;
    x %= mod;
  }
  for (long long i = 1; i <= n; i++) {
    y *= i;
    y %= mod;
  }
  for (int i = 0; i < mod - 2; i++) {
    z *= y;
    z %= mod;
  }
  cout << (x * z - 1 + mod) % mod;
  return 0;
}
