#include <stdio.h>
#define MOD_BY 100000
int add(int a, int b) {
return a + b - MOD_BY * (a + b >= MOD_BY);
}
int w, h;
int memo[128][128][5];
const int yoko_next[5] = { 2, 2, 2, 1, 1 };
const int tate_next[5] = { 4, 3, 3, 4, 4 };
/*
status
0 : 走っていない
1 : 横に進んだ、旋回禁止
2 : 横に進んだ、旋回OK
3 : 縦に進んだ、旋回禁止
4 : 縦に進んだ、旋回OK
*/
int calc(int x, int y, int status) {
int ans = 0;
if (x == w && y == h) return 1;
if (memo[x][y][status]) return ~memo[x][y][status];
if (x < w && status != 3) {
ans = add(ans, calc(x + 1, y, yoko_next[status]));
}
if (y < h && status != 1) {
ans = add(ans, calc(x, y + 1, tate_next[status]));
}
return ~(memo[x][y][status] = ~ans);
}
int main(void) {
if (scanf("%d%d", &w, &h) != 2) return 1;
printf("%d\n", calc(1, 1, 0));
return 0;
}