#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
long long t,k;
long long n,m;
long long c[2050][2050];
int main()
{
freopen("com.in","r",stdin);
freopen("com.out","w",stdout);
for(long long i=0;i<=2000;i++)
{
c[i][0]=1;c[i][i]=1;
for(long long j=1;j<i;j++)
{
c[i][j]=((c[i-1][j-1]%100003)+(c[i-1][j]%100003))%100003;
}
}
scanf("%lld%lld",&n,&m);
cout<<c[n][m];
fclose(stdin);fclose(stdout);
return 0;
}