#include <bits/stdc++.h>
using namespace std;
long long inv[3 * 1000000], p = 1000003, ans = 1, n, m;
int main() {
  cin >> n >> m;
  n += m;
  inv[1] = 1;
  for (long long i = 2; i <= n; ++i) inv[i] = (p - p / i) * inv[p % i] % p;
  for (int i = m + 1; i <= n; ++i) ans = ans * i % p;
  for (int i = 1; i <= n - m; ++i) ans = ans * inv[i] % p;
  cout << ans - 1 << endl;
  return 0;
}
