#include <iostream>
#include <algorithm>
#include <map>
#include <cstring>
using namespace std;
const int mod = 100000;

const int MAX_W = 101;
const int MAX_H = 101;
int dp[MAX_W][MAX_H][4];
int w, h;
// a ??? 0 ?????¨??????????????????
// a ??? 1 ?????¨??????????????£??????
// a ??? 2 ?????¨????¨?????????????
// a ??? 3 ?????¨????¨?????????£??????
// i????¨????j??????
int func(int i, int j, int a){
	if(i >= w || j >= h) return 0;
	if(dp[i][j][a] != -1) return dp[i][j][a];
	if(i == w - 1 && j == h - 1) return 1;
	int rec = 0;
	if(a == 0) rec = func(i, j + 1, 1);
	else if(a == 1) rec = func(i, j + 1, 1) + func(i + 1, j, 2);
	else if(a == 2) rec = func(i + 1, j, 3);
	else if(a == 3) rec = func(i, j + 1, 0) + func(i + 1, j, 3);
	return dp[i][j][a] = rec % mod;
	//return 0;
}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	
	while(cin >> w >> h && w != 0 && h != 0){
	memset(dp, -1, sizeof(dp));
	cout << (func(0, 1, 1) + func(1, 0, 3)) % mod << endl;
	}
}