fn main() { let mut buf = String::new(); std::io::stdin().read_line(&mut buf).unwrap(); let s: Vec = buf.split_whitespace().map(|s| s.parse().unwrap()).collect(); let mut count = s[2]; if s[0] <= s[2] { count -= 1; } if s[1] <= s[2] { count -= 1; } println!("{}", count); }