const main = (standardInput) => {
    const lengthList = standardInput.split(' ');
    const inputHeight = Number.parseInt(lengthList[0]);
    const inputWidth = Number.parseInt(lengthList[1]);
   	var movablePosition = ['1,1']
  	
    for(var th = 1; th <  inputHeight+1; th++){
    	for(var tw = 1; tw <  inputWidth+1; tw++){
           if(movablePosition.indexOf(`${th},${tw}`) !== -1){
    		for(var ih = 1; ih <  inputHeight+1; ih++){
    			for(var iw = 1; iw <  inputWidth+1; iw++){
          				if(th+tw === ih+iw){
          					if(movablePosition.indexOf(`${ih},${iw}`) === -1) {
     
              					movablePosition.push(`${ih},${iw}`);
            				}
          				}else if(th-tw === ih-iw){
            				if(movablePosition.indexOf(`${ih},${iw}`) === -1) {
                              
              					movablePosition.push(`${ih},${iw}`);
            				}
          				}
          			}
        		}
            }
        }
    }
  	  
  
  
  	const answer = movablePosition.length;
    console.log(answer);
}

main(require('fs').readFileSync('/dev/stdin', 'UTF-8'));