import std.c.stdio;
import std.c.string;

const int MOD = 100000;

const int MAX_H = 105;
const int MAX_W = 105;

int H, W;

int dp[MAX_H][MAX_W][4];

int main()
{
	while (true)
	{
		scanf("%d", &W);
		scanf("%d", &H);

		if (W == 0 && H == 0) { break; }

		for(int i = 0; i < H; i++) { for(int j = 0; j < W; j++) { dp[i][j] = 0; } }

		for (int i = 0; i < H; i++)
			dp[i][0][2] = 1;

		for (int j = 0; j < W; j++)
			dp[0][j][3] = 1;

		for (int i = 1; i < H; i++)
		{
			for (int j = 1; j < W; j++)
			{
				dp[i][j][0] = dp[i - 1][j][3];
				dp[i][j][1] = dp[i][j - 1][2];
				
				for (int k = i - 1; k >= 1; k--)
				{
					dp[i][j][2] += dp[k][j][0];
				}

				dp[i][j][2] %= MOD;

				for (int k = j - 1; k >= 1; k--)
				{
					dp[i][j][3] += dp[i][k][1];
				}

				dp[i][j][3] %= MOD;
			}
		}

		printf("%d\n", (dp[H - 1][W - 1][0] + dp[H - 1][W - 1][1] + dp[H - 1][W - 1][2] + dp[H - 1][W - 1][3]) % MOD);
	}

	return 0;
}