#include <bits/stdc++.h>
using namespace std;
long long int mod = 1e6 + 3;
long long int ans;
long long int pwers[500010];
long long int my_pow(long long int a, long long int b) {
  if (b == 0) return 1;
  long long int ret = my_pow(a, b / 2);
  ret = (ret * ret) % mod;
  if (b % 2 == 1) ret = (ret * a) % mod;
  return ret;
}
long long int C(long long int n, long long int r) {
  if (r == 0) return 1;
  long long int num = (n % mod * C(n - 1, r - 1) % mod) % mod;
  long long int den = pwers[r];
  ans = (ans % mod + (num * den) % mod) % mod;
  return (num * den) % mod;
}
int main() {
  long long int n, c;
  cin >> n >> c;
  pwers[1] = 1;
  for (long long int i = 2; i <= n; i++) pwers[i] = my_pow(i, mod - 2);
  long long int x = C(n + c - 1, n);
  cout << ans << endl;
  return 0;
}
