x, y, z = gets.split.map(&:to_i) z.times { x > y ? y += 1 : x += 1 } puts [x, y].min