use proconio::input; use std::io::{stdout,Write,BufWriter}; fn main() { input!{ r:u32, g:u32, b:u32 } let out: std::io::Stdout = stdout(); let mut out: BufWriter> = BufWriter::new(out.lock()); let [c1, c2, c3] = { let mut tmp: [u32; 3] = [r,g,b]; tmp.sort(); tmp }; let mut ans: u32; if (c3-c2)/2 >= c2-c1 { ans = (2*c1 + 2*c2 + c3 - (2*c1 + 2*c2 + c3)%5) / 5; } else { ans = (2*c1 + c2 + c3 - (2*c1 + c2 + c3)%4) / 4; if (c2-ans)%2==1 && (c3-ans)%2==1 { ans -= 1; } } write!(out, "{}", ans).unwrap(); }