import std.stdio, std.string, std.conv;

void main()
{
	auto n = readln.split.to!(int[]), a = n[0], b = n[1];
	int m;
	if((a + b) % 2 == 0){
		m = 0;
	} else {
		m = 1;
	}
	writeln((a + b) / 2 + m);
}