#include <iostream>
using namespace std;

long long int dpe[110][110],dpn[110][110],dpem[110][110],dpnm[110][110];

int main(){
	int W,H;
	while(1){
		cin>>W>>H;
		if(W==0&&H==0) break;

		for(int i=0;i<=W;i++){
			for(int j=0;j<=H;j++){
				dpe[i][j]=dpn[i][j]=dpnm[i][j]=dpem[i][j]=0;
			}
		}
		
		for(int i=1;i<=W;i++){
			for(int j=1;j<=H;j++){
				if(i!=1||j!=1){
					dpe[i][j]=dpe[i-1][j]+dpem[i-1][j];
					dpn[i][j]=dpn[i][j-1]+dpnm[i][j-1];
					dpem[i][j]=dpn[i-1][j];
					dpnm[i][j]=dpe[i][j-1];
				}
				else{
					dpe[i][j]=dpn[i][j]=0;
					dpem[i][j]=dpnm[i][j]=1;
				}
				dpe[i][j]%=100000;
				dpem[i][j]%=100000;
				dpn[i][j]%=100000;
				dpnm[i][j]%=100000;
			}
		}
		cout<<(dpe[W][H]+dpn[W][H]+dpem[W][H]+dpnm[W][H])%100000<<endl;
		/*
		for(int i=1;i<=W;i++){
			for(int j=1;j<=H;j++){
				cout<<"["<<i<<","<<j<<"]"<<" ";
				cout<<"dpe"<<dpe[i][j]<<" dpem"<<dpem[i][j]<<" dpn"<<dpn[i][j]<<" dpnm"<<dpnm[i][j]<<" ";
			}
			cout<<endl;
		}
		*/
		
	}
	return 0;
}