import std.stdio;
import std.algorithm;
import std.conv;
import std.array;
import std.string;
import std.math;
import std.functional;
import std.range;
import std.typecons;
import std.format;

void main(string[] args) {
  readln.solve.writeln;
}

auto solve(string line1) {
  auto _ = line1.split.map!(to!real);
  real a = _[0];
  real b = _[1];
  return ((a + b)/2).ceil.to!int;
} unittest {
  assert(solve("1 3") == 2, "1");
  assert(solve("7 4") == 6, "2");
  assert(solve("5 5") == 5, "3");
}