function Main(input) {
  input = input.split(" ");
  var a = parseInt(input[0], 10);
  var b = parseInt(input[1], 10);
  var s = a+b;
  if(s>=24){
    s=s-24;
  }
    console.log('%s', s);
  }
  Main(require("fs").readFileSync("/dev/stdin", "utf8"));