using System; using System.Collections.Generic; using System.Linq; public class P1010 { public static void Main() { var xyh = Console.ReadLine().Trim().Split(' ').Select(int.Parse).ToList(); var x = xyh[0] * 1000.0; var y = xyh[1] * 1000.0; var h = xyh[2]; var cands = new Queue<(double, double, int, int)>(); var target = (x: x, y: y, h: h, count: 0); cands.Enqueue(target); while (cands.Count() > 0) { target = cands.Dequeue(); if(target.x > target.h) { cands.Enqueue((target.x / 2, target.y, target.h * 2, target.count+1)); } if(target.y > target.h) { cands.Enqueue((target.x, target.y / 2, target.h * 2, target.count+1)); } } Console.WriteLine(target.count); } }