#include<iostream>
#include<cstdio>
typedef long long ll;
const int mod = 100003 ;
ll pw[1010],inv[1010];
int n,m;
ll qpow(ll a,ll p){
ll ret=1;
for(;p;p>>=1,a*=a){
ret %= mod , a %= mod ;
if(p&1)ret = ret * a % mod ;
ret %= mod , a %= mod ;
}
return ret;
}
ll C(ll n,ll m){
if(!m)return 1;
if(n==m)return 1;
else return pw[n]*inv[m]%mod*inv[n-m]%mod;
}
int main(){
freopen("com.in","r",stdin);
freopen("com.out","w",stdout);
scanf("%d%d",&n,&m);
pw[1]=1;for(int i=2;i<=n;i++)pw[i]=pw[i-1]*i%mod;
inv[n]=qpow(pw[n],mod-2);
for(int i=n-1;i;i--)inv[i]=inv[i+1]*(i+1)%mod;
ll ans = C(n,m);
printf("%lld\n",C(n,m));
}