/*
#include<stdio.h>
int memo[100][100] = {};
int first[100000] = {};
//memo[x][y] = memo[r][c]
int pibo(int r, int c) {
for(c=1; c<=51; c++) {
memo[1][c] = 1;
first[c] = 1;
}
for(r=1; r<=51; r++) {
memo[r][1] = 1;
first[r] = 1;
}
for(r=1; r<=51; r++) {
for(c=1; c<=51; c++) {
if(memo[r-1][c-1] != 0) {
memo[r][c] = first[r-1] + first[c-1];
}
}
}
}
int main() {
int r, c;
scanf("%d %d", &r, &c);
printf("%d", pibo(r,c));
return 0;
}
#include<stdio.h>
int memo[100][100] = {};
int pibo(int r, int c) {
if(r==1 || c==1) {
return memo[r][c] = 1;
}
if(memo[r][c] != 0) {
return memo[r][c];
}
return memo[r][c] =pibo(r-1,c)%100000000 + pibo(r,c-1)%100000000;
}
int main() {
int r,c;
scanf("%d %d", &r, &c);
printf("%d", pibo(r,c)%100000000);
return 0;
}
*/