#include <bits/stdc++.h>
using namespace std;
long long n, m, p;
long long Ext_gcd(long long a, long long b, long long &x, long long &y) {
  if (b == 0) {
    x = 1, y = 0;
    return a;
  }
  long long ret = Ext_gcd(b, a % b, y, x);
  y -= a / b * x;
  return ret;
}
long long Inv(long long a, int m) {
  long long d, x, y, t = (long long)m;
  d = Ext_gcd(a, t, x, y);
  if (d == 1) return (x % t + t) % t;
  return -1;
}
long long Cm(long long n, long long m, long long p) {
  long long a = 1, b = 1;
  if (m > n) return 0;
  while (m) {
    a = (a * n) % p;
    b = (b * m) % p;
    m--;
    n--;
  }
  return (long long)a * Inv(b, p) % p;
}
int Lucas(long long n, long long m, long long p) {
  if (m == 0) return 1;
  return (long long)Cm(n % p, m % p, p) * (long long)Lucas(n / p, m / p, p) % p;
}
int main() {
  p = 1000003;
  while (~scanf("%I64d%I64d", &n, &m)) {
    long long ans = Lucas(n + m, m, p);
    ans = (ans + p - 1) % p;
    printf("%I64d\n", ans);
  }
  return 0;
}
