"use strict";
const Main = function(input){
	let xs = input.trim().split(' ').map(v=>parseInt(v,10));
    let ans = xs[0] + xs[1];
    if(ans>=24){
    	console.log(ans-24);
    }else{
    	console.log(ans);
    }
                               
  
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));