// Learn more about F# at http://fsharp.org open System let rec pow a x = if x = 0L then 1L elif x = 1L then a elif x % 2L = 0L then pow (a * a) (x / 2L) else a * (pow a (x - 1L)) [] let main argv = let [| xx; yy; h |] = stdin.ReadLine().Split() |> Array.map int64 let x, y = Math.Min(xx, yy), Math.Max(xx, yy) let ans = seq { for a in 0L .. 16L do for b in 0L .. 16L do // x を a 回折れるか // x / 2^(a - 1) > h * 2^(a - 1) if a = 0L || x * 1000L > h * (pow 2L (a - 1L)) * (pow 2L (a - 1L)) then if b = 0L || y * 1000L > h * (pow 2L a) * (pow 2L (b - 1L)) * (pow 2L (b - 1L)) then yield (a, b) } |> Seq.map (fun tup -> (fst tup) + (snd tup)) |> Seq.max printfn "%d" ans 0 // return an integer exit code