Problem:
Handsel

Alice and Brown are brothers in a family and each receives pocket money in celebration of the coming year. They are very close and share the total amount of the money fifty-fifty. The pocket money each receives is a multiple of 1,000 yen.

Write a program to calculate each one’s share given the amount of money Alice and Brown received.

Input

The input is given in the following format.

a b

A line of data is given that contains two values of money: a (1000 ≤ a ≤ 50000) for Alice and b (1000 ≤ b ≤ 50000) for Brown.

Output

Output the amount of money each of Alice and Brown receive in a line.

Sample Input 1

1000 3000

Sample Output 1

2000

Sample Input 2

5000 5000

Sample Output 2

5000

Sample Input 3

1000 2000

Sample Output 3

1500

Solution in JAVA (judge verdict: Accepted)

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import static java.lang.Integer.parseInt;

/**
 * Handsel
 */
public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;
		String[] words;

		line = br.readLine();

		int a, b;
		a = parseInt(line.substring(0, line.indexOf(' ')));
		b = parseInt(line.substring(line.indexOf(' ') + 1));

		System.out.println((a + b) / 2);
	}
}