use std::cmp::*; use std::io::*; fn rec(x: u64, y: u64, h: u64, c: u64) -> u64 { if h >= x && h >= y { return c; } let mut res = c; if y > h { res = max(res, rec(x, y >> 1, h << 1, c + 1)); } if x > h { res = max(res, rec(x >> 1, y, h << 1, c + 1)); } res } fn main() { let mut s: String = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut itr = s.trim().split_whitespace(); let mut x: u64 = itr.next().unwrap().parse().unwrap(); let mut y: u64 = itr.next().unwrap().parse().unwrap(); let h: u64 = itr.next().unwrap().parse().unwrap(); x *= 1000; y *= 1000; println!("{}", rec(x, y, h, 0)); }