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 Java8 (OpenJDK 1.8.0) (judge verdict: Runtime Error)

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

/**
 *
 * @author Owner
 *
 */
public class Main {
	/**
	 *
	 * @param args
	 */
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		//String s = sc.nextLine();
		//拠点数
		int N = sc.nextInt();
		//平均気温
		double T = sc.nextDouble();
		//希望気温
		double A = sc.nextDouble();
		//		double y = 0;

		List<Double> Hi = new ArrayList<>();

		for (int i = 1; i <= N; i++) {
			double H = sc.nextInt();
			Hi.add(H);
		}
		List<Double> X = new ArrayList<Double>();
		List<Double> XX = new ArrayList<Double>();
		for (Double d : Hi) {
			Double dd = Math.abs(A - (T - d * 0.006));
			X.add(dd);
			XX.add(dd);
		}
		Collections.sort(X);

		int ii = 1;
		for (Double d : XX) {
			if (d == X.get(0)) {
				break;
			}
			ii++;
		}
		System.out.print(ii);
	}
}