#include <bits/stdc++.h>
using namespace std;

#define for_(i,a,b) for(int i=(a);i<(b);++i)

int W, H, dp[110][110][2][2];
const int MOD = 100000, dx[2] = {1,0}, dy[2] = {0,1};

void modAdd(int& a, int b) { a = (a + b) % MOD; }

void solve() {
	memset(dp, 0, sizeof(dp));
	dp[0][0][0][1] = dp[0][0][1][1] = 1;
	
	for_(y,0,H) for_(x,0,W) {
		for_(d,0,2) for_(f,0,2) {
			int nx = x + dx[d], ny = y + dy[d];
			
			modAdd(dp[ny][nx][d][0], dp[y][x][d][f]);
			
			if (f == 0) {
				int dd = (d + 1) % 2;
				nx = x + dx[dd];
				ny = y + dy[dd];
				
				modAdd(dp[ny][nx][dd][1], dp[y][x][d][f]);
			}
		}
	}
	
	int ans = 0;
	for_(d,0,2) for_(f,0,2) modAdd(ans, dp[H - 1][W - 1][d][f]);
	cout << ans << endl;
}

int main() {
	while (cin >> W >> H, W) solve();
}