#![allow(unused_imports, unused_macros, dead_code, bare_trait_objects)] macro_rules! get{ ($t:ty) => { { let cin = stdin(); let mut cin = cin.lock(); let token = cin.by_ref().bytes().map(|c| c.unwrap() as char) .skip_while(|c| c.is_whitespace()) .take_while(|c| !c.is_whitespace()) .collect::(); try!(token.parse::<$t>()) } } } macro_rules! input{ ($($id:ident: $t:ty),*) => { $( let $id = get!($t); )*; } } macro_rules! input_vec{ ($id:ident: Vec<$t:ty>, $n:expr) => { let n = $n; let mut $id: Vec<$t> = Vec::with_capacity(n); for _ in 0..n { let temp = get!($t); $id.push(temp); } } } use std::io::{Read,stdin}; use std::str::*; use std::error::Error; use std::fmt::Debug; use std::ops::*; fn main(){ while let Ok(_) = solve() {} } fn solve() -> Result<(),Box>{ input!(x: i64, y: i64, z: i64); let mut ans = z; if x <= z {ans -= 1;} if y <= z {ans -= 1;} println!("{}", ans); Ok(()) }