Problem:
Score: 100 points

Problem Statement

There is a train going from Station A to Station B that costs X yen (the currency of Japan).

Also, there is a bus going from Station B to Station C that costs Y yen.

Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus.

How much does it cost to travel from Station A to Station C if she uses this ticket?

Constraints

1 \leq X,Y \leq 100

Y is an even number.

All values in input are integers.

Input

Input is given from Standard Input in the following format:

X Y

Output

If it costs x yen to travel from Station A to Station C, print x.

Sample Input 1

81 58

Sample Output 1

110

The train fare is 81 yen.

The train fare is 58 ⁄ 2=29 yen with the 50% discount.

Thus, it costs 110 yen to travel from Station A to Station C.

Sample Input 2

4 54

Sample Output 2

31

Solution in JavaScript (node.js v5.12) (judge verdict: Runtime Error)

function Main(input) {
	input = input.split("\n");
	var tmp = input[0].split(" ");
    var N = parseInt(tmp[0], 10);
    var M = parseInt(tmp[1], 10);
    var inputArray = getInputArray(input,N,M);
    sortEachCol(inputArray);
    setCode2InputArray(inputArray);
    sortEachColIndex(inputArray);
	for(var i=0;i<inputArray.length;i++){
        console.log(zeroPaddingSixDigit(inputArray[i].p) + zeroPaddingSixDigit(inputArray[i].code));
    }
}

function setCode2InputArray(inputArraySorted){
    inputArraySorted.forEach(function(element,index) {
        element.code = index;
    });
}
function sortEachCol(inputArray){
    inputArray.sort(function(a,b){
        return a.value - b.value;
    });
}
function sortEachColIndex(inputArray){
    inputArray.sort(function(a,b){
        return a.index - b.index;
    });
}

function getInputArray(input,N,M){
    var inputArray = [];
    for(var i=0;i<M;i++){
	    var tmp = input[i+1].split(" ");
        if(tmp.length !== 2){
            continue;
        }
        var p = parseInt(tmp[0],10);
        var value = parseInt(tmp[1],10);
        inputArray.push({index:i,value:value,p:p});
    }
    return inputArray;
}

function zeroPaddingSixDigit(num){
    return ('000000' + num).slice(-6)
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));