fn main() { let stdin = std::io::read_to_string(std::io::stdin()).unwrap(); let mut stdin = stdin.split_ascii_whitespace(); let a: u32 = stdin.next().unwrap().parse().unwrap(); let b: u32 = stdin.next().unwrap().parse().unwrap(); let c: u32 = stdin.next().unwrap().parse().unwrap(); println!("{}", output(solve(a, b, c))); } fn solve(a: u32, b: u32, c: u32) -> Option { match a as u64 * 60 <= b as u64 { true => None, false => { let cost_cut = a as u64 * 60 - b as u64; Some((c as u64 * 3600 + cost_cut - 1) / cost_cut) } } } fn output(ans: Option) -> String { match ans { Some(ans) => ans.to_string(), None => String::from("-1"), } }