x, y, h = map(int, input().split()) x *= 1000 y *= 1000 calced = set() q = [(x, y, h, 0)] result = 0 while q: x, y, h, r = q.pop() if r > result: result = r if x > h and (x // 2, h) not in calced: calced.add((x // 2, h)) q.append((x // 2, y, h * 2, r + 1)) if y > h and (x, h // 2) not in calced: calced.add((x, h // 2)) q.append((x, y // 2, h * 2, r + 1)) print(result)