use std::io::{stdin, Read}; fn main() { let mut buf = String::new(); stdin().read_to_string(&mut buf).unwrap(); let mut tok = buf.split_whitespace(); let mut get = || tok.next().unwrap(); macro_rules! get { ($t:ty) => (get().parse::<$t>().unwrap()); () => (get!(i64)); } let a = get!() * 60; let b = get!(); let c = get!() * 60 * 60; // a*x < b*x + c (better manual) // x < c/(a-b) // x < ceil(c/(a-b)) // a*x >= b*x + c (better auto) // (a-b)*x >= c // x >= c/(a-b) // x > floor(c/(a-b)) if a <= b { println!("-1"); } else { let x = c / (a - b); println!("{}", x + 1); } }