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