fn run() { let mut s = String::new(); std::io::stdin().read_line(&mut s).unwrap(); let mut it = s.trim().split_whitespace(); let mut x: usize = it.next().unwrap().parse().unwrap(); let mut y: usize = it.next().unwrap().parse().unwrap(); let mut z: usize = it.next().unwrap().parse().unwrap(); if x < y { let v = std::cmp::min(y - x, z); z -= v; x += v; } else { let v = std::cmp::min(x - y, z); z -= v; y += v; } let ans = std::cmp::min(x, y) + z / 2; println!("{}", ans); } fn main() { run(); }