EastWest, NorthSouth, Length = [int(input()) for _ in range(3)] i = 0 if EastWest < 0: i += 1 if NorthSouth < 0: i += 1 L = Length while L < EastWest: L += L i += 1 if EastWest - L != 0: i += 1 L = Length while L < NorthSouth: L += L i += 1 if NorthSouth - L != 0: i += 1 print(i)