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 java.util.StringTokenizer;

class Main{
	public static void main(String[] args) {

		BufferedReader bfr=new BufferedReader(new InputStreamReader(System.in));
		String str="";
		StringTokenizer stk;
		int[] k1=new int[2];
		int i=0;
		try {
			while(true) {
				str = bfr.readLine();
				if(str==null) {
					System.exit(0);
				}
				stk=new StringTokenizer(str," ");
				while(stk.hasMoreTokens()) {
					k1[i]=Integer.parseInt(stk.nextToken());
					i++;
				}
				i=0;
				System.out.println(""+(k1[0]+k1[1])/2);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}