#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T bigmod(T p, T e, T M) {
  long long ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
long long fact[1000001], inv[1000001];
long long ncr(int n, int r, long long md) {
  if (n < r) return 0;
  long long ret = (fact[n] * inv[r]) % md;
  return (ret * inv[n - r]) % md;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, m;
  cin >> n >> m;
  long long res = 0;
  long long md = 1000003;
  fact[0] = 1;
  for (long long i = 1; i <= 1000000; i++) fact[i] = (fact[i - 1] * i) % md;
  for (int i = (0); i < (1000001); ++i) inv[i] = modinverse(fact[i], md);
  if (n == 1) {
    cout << m << endl;
    return 0;
  }
  for (long long i = 1; i <= n; i++) {
    if (i > n) break;
    res = (res + ncr(i + m - 1, i, md)) % md;
  }
  cout << res << endl;
}
