#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000003;
long long mod_pow(long long x, long long n) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) res = res * x % mod;
    x = x * x % mod;
    n >>= 1;
  }
  return res;
}
long long pwc(long long n, long long m) {
  m = min(m, n - m);
  long long a = 1, b = 1;
  for (int i = 1; i <= m; i++) {
    a = a * i % mod;
    b = b * (n + 1 - i) % mod;
  }
  a = mod_pow(a, mod - 2);
  return a * b % mod;
}
int main() {
  long long n, m;
  cin >> n >> m;
  cout << (pwc(n + m, m) + mod - 1) % mod << endl;
}
