// No.920 あかあお package main import ( "fmt" "math" ) func main() { var x, y, z int fmt.Scan(&x, &y, &z) var diff = int(math.Abs(float64(x) - float64(y))) if z == 0 { fmt.Println(min(x, y)) } else if diff >= z { fmt.Println(min(x, y) + min(diff, z)) } else { fmt.Println(min(x, y) + diff + int((z-diff)/2)) } }