x, y, z = gets.chomp.split.map &:to_i purple = [x, y].min c = (x - y).abs purple += c purple += (z - c) / 2 if c <= z p purple