use std::io::Read; fn solve(x: u64, y: u64, z: u64) { println!("{}" , z - if x <= z { 1 } else { 0 } - if y <= z { 1 } else { 0 }); } fn main() { let mut xyz = String::new(); std::io::stdin().read_to_string(&mut xyz).ok(); let xyz: Vec = xyz.trim().split('\n').next().unwrap().trim() .split_whitespace() .map(|s| s.parse::().unwrap()) .collect(); solve(xyz[0], xyz[1], xyz[2]); }