#include <bits/stdc++.h>
using namespace std;
const int max_n = 1111111, mod = 1000003;
int n, m, f[max_n], rf[max_n];
int power(int a, int b, int mod) {
  if (b == 0) {
    return 1 % mod;
  }
  if (b % 2 == 0) {
    return power((1LL * a * a) % mod, b / 2, mod);
  }
  return (1LL * a * power(a, b - 1, mod)) % mod;
}
int get_c(int n, int k) {
  if (n < k) {
    return 0;
  }
  int res = (1LL * f[n] * rf[k]) % mod;
  return (1LL * res * rf[n - k]) % mod;
}
int main() {
  f[0] = rf[0] = 1;
  for (int i = 1; i < max_n; ++i) {
    f[i] = (1LL * i * f[i - 1]) % mod;
    rf[i] = power(f[i], mod - 2, mod);
  }
  cin >> n >> m;
  cout << (get_c(n + m, m) + mod - 1) % mod << endl;
  return 0;
}
