There are two infinite sources of water:  hot water of temperature $h$;  cold water of temperature $c$ ($c < h$). 

You perform the following procedure of alternating moves:  take one cup of the hot water and pour it into an infinitely deep barrel;  take one cup of the cold water and pour it into an infinitely deep barrel;  take one cup of the hot water $\dots$  and so on $\dots$ 

Note that you always start with the cup of hot water.

The barrel is initially empty. You have to pour at least one cup into the barrel. The water temperature in the barrel is an average of the temperatures of the poured cups.

You want to achieve a temperature as close as possible to $t$. So if the temperature in the barrel is $t_b$, then the absolute difference of $t_b$ and $t$ ($|t_b - t|$) should be as small as possible.

How many cups should you pour into the barrel, so that the temperature in it is as close as possible to $t$? If there are multiple answers with the minimum absolute difference, then print the smallest of them.


-----Input-----

The first line contains a single integer $T$ ($1 \le T \le 3 \cdot 10^4$) — the number of testcases.

Each of the next $T$ lines contains three integers $h$, $c$ and $t$ ($1 \le c < h \le 10^6$; $c \le t \le h$) — the temperature of the hot water, the temperature of the cold water and the desired temperature in the barrel.


-----Output-----

For each testcase print a single positive integer — the minimum number of cups required to be poured into the barrel to achieve the closest temperature to $t$.


-----Example-----
Input
3
30 10 20
41 15 30
18 13 18

Output
2
7
1



-----Note-----

In the first testcase the temperature after $2$ poured cups: $1$ hot and $1$ cold is exactly $20$. So that is the closest we can achieve.

In the second testcase the temperature after $7$ poured cups: $4$ hot and $3$ cold is about $29.857$. Pouring more water won't get us closer to $t$ than that.

In the third testcase the temperature after $1$ poured cup: $1$ hot is $18$. That's exactly equal to $t$.

Difficulty: MEDIUM_HARD

Solutions:
import sys, math, os
from io import BytesIO, IOBase
from bisect import bisect_left as bl, bisect_right as br, insort
from collections import defaultdict as dd, deque, Counter

def data():
	return sys.stdin.readline().strip()

def mdata():
	return list(map(int, data().split()))

def outl(var):
	sys.stdout.write(' '.join(map(str, var)) + '\n')

def out(var):
	sys.stdout.write(str(var) + '\n')
sys.setrecursionlimit(100000)
from fractions import Fraction
INF = float('inf')
mod = 998244353

def main():
	for t in range(int(data())):
		(h, c, t) = mdata()
		if (h + c) / 2 >= t:
			out(2)
			continue
		if t == h:
			out(1)
			continue
		k = int((h - t) // abs((h + c) / 2 - t))
		k -= 2
		if k % 2 != 0:
			k -= 1
		k = max(0, k)
		if Fraction(abs(2 * t * (k + 5) - ((k + 4) * (h + c) + 2 * h)), k + 5) < Fraction(abs(2 * t * (k + 1) - (k * (h + c) + 2 * h)), k + 1) and Fraction(abs(2 * t * (k + 5) - ((k + 4) * (h + c) + 2 * h)), k + 5) < Fraction(abs(2 * t * (k + 3) - ((k + 2) * (h + c) + 2 * h)), k + 3):
			out(k + 5)
		elif Fraction(abs(2 * t * (k + 1) - (k * (h + c) + 2 * h)), k + 1) <= Fraction(abs(2 * t * (k + 3) - ((k + 2) * (h + c) + 2 * h)), k + 3):
			out(k + 1)
		else:
			out(k + 3)
main()


for _ in range(int(input())):
	(h, c, t) = [int(c) for c in input().split()]
	if t <= (h + c) / 2:
		print(2)
	else:
		a = h - t
		b = 2 * t - h - c
		k = 2 * (a // b) + 1
		a = abs(k // 2 * c + (k + 1) // 2 * h - t * k)
		b = abs((k + 2) // 2 * c + (k + 3) // 2 * h - t * (k + 2))
		if a * (k + 2) <= b * k:
			ans = k
		else:
			ans = k + 2
		print(ans)


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if t >= h:
		print(1)
		continue
	if 2 * t <= h + c:
		print(2)
		continue
	(l, r) = (1, 1000000000)
	while l < r:
		m = l + r >> 1
		if m * h + (m - 1) * c > (2 * m - 1) * t:
			l = m + 1
		else:
			r = m
	k = l
	k3 = k - 1
	if k3 > 0 and 2 * t * (2 * k - 1) * (2 * k3 - 1) >= (k * h + (k - 1) * c) * (2 * k3 - 1) + (k3 * h + (k3 - 1) * c) * (2 * k - 1):
		(k, x) = (k3, (k3 * h + (k3 - 1) * c) / (2 * k3 - 1))
	else:
		x = (k * h + (k - 1) * c) / (2 * k - 1)
	mn = min(abs(h - t), abs((h + c) / 2 - t), abs(x - t))
	if abs(h - t) == mn:
		print(1)
	elif abs((h + c) / 2 - t) == mn:
		print(2)
	else:
		print(2 * k - 1)


import sys
from collections import defaultdict as dd
import heapq
import math
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
input = sys.stdin.readline
for i in range(int(input())):
	(h, c, t) = map(int, input().split())
	l = t - (h + c) / 2
	if t == h:
		print(1)
	elif 2 * t <= h + c:
		print(2)
	else:
		k = int(((h - c) / (2 * l) + 1) / 2)
		q = (h - c) / (2 * (2 * k + 1)) - l
		w = (h - c) / (2 * (2 * k - 1)) - l
		if q < 0:
			q *= -1
		if w < 0:
			w *= -1
		if q < w:
			print(2 * k + 1)
		else:
			print(2 * k - 1)


T = int(input())
while T > 0:
	T -= 1
	(h, c, t) = map(int, input().split())
	if 2 * t <= h + c:
		print(2)
		continue
	k = (h - t) // (2 * t - h - c)
	if abs((2 * k + 3) * t - k * h - 2 * h - k * c - c) * (2 * k + 1) < abs((2 * k + 1) * t - k * h - h - k * c) * (2 * k + 3):
		print(2 * k + 3)
	else:
		print(2 * k + 1)


from math import *
s = int(input())
for _ in range(s):
	(h, c, t) = map(int, input().split())
	k = (h + c) / 2
	if k >= t:
		ans = 2
	else:
		d = h - t
		x = 2 * t - h - c
		l = d // x
		a = (l + 1) * h + l * c
		m = abs(a - t * (2 * l + 1))
		m = m * (2 * l + 3)
		b = (l + 2) * h + (l + 1) * c
		n = abs(b - t * (2 * l + 3))
		n = n * (2 * l + 1)
		if m > n:
			ans = 2 * l + 3
		else:
			ans = 2 * l + 1
	print(ans)


import sys
import string
input = sys.stdin.readline
import math
from decimal import Decimal
l = int(input())
for i in range(l):
	n = list(map(int, input().split()))
	(a, b) = (n[0] - n[1], n[2] - n[1])
	try:
		s = int(2 / (2 - a / b)) - 1
	except:
		s = 0
	best = 99999999
	for j in range(max(s // 2, 0), s // 2 + 2):
		p = Decimal(a * (j + 1))
		r = Decimal(2 * j + 1)
		m_num = p / r
		m_num = abs(m_num - b)
		if m_num < best:
			best = m_num
			ans = 2 * j + 1
	if a <= b:
		print(1)
	elif b <= a / 2:
		print(2)
	elif best < abs(a - b):
		print(ans)
	else:
		print(1)


import math
T = int(input())
for _ in range(T):
	(h, c, t) = map(int, input().split())
	if 2 * t <= h + c:
		print(2)
	else:
		estimate = (h - c) // (2 * t - (h + c)) // 2
		if (h + c) * (4 * (estimate + 1) ** 2 - 1) + 2 * (h - c) * (estimate + 1) <= 2 * t * (4 * (estimate + 1) ** 2 - 1):
			print(2 * estimate + 1)
		else:
			print(2 * estimate + 3)


from sys import stdin
input = stdin.readline
import bisect
import math

def sol(x, y, z):
	p = (x + y) / 2
	p = p - z
	p *= 2
	kk = (y - x) / p
	return kk
for xoxo in range(1):
	for _ in range(int(input())):
		ans = [[], []]
		(h, c, t) = map(int, input().split())
		ans[0].append(abs(h - t))
		ans[1].append(1)
		if h == t:
			print('1')
			continue
		ans[0].append(abs(t - (h + c) / 2))
		ans[1].append(2)
		if (h + c) % 2 == 0 and (h + c) // 2 == t:
			print('2')
			continue
		x = math.ceil(sol(h, c, t))
		y = x
		if x % 2 == 0 and x > 1:
			x -= 1
			y += 1
		if x > 0:
			ans[0].append(abs(t - (h + c) / 2 + (c - h) / (2 * x)))
			ans[1].append(x)
		if y > 0:
			ans[0].append(abs(t - (h + c) / 2 + (c - h) / (2 * y)))
			ans[1].append(y)
		o = min(ans[0])
		for i in range(len(ans[0])):
			if ans[0][i] == o:
				print(ans[1][i])
				break


import sys, math, random
input = sys.stdin.readline
import sys, math, random
input = sys.stdin.readline
T = int(input())
for _ in range(T):
	(n, m, t) = map(int, input().split())
	diff = abs(t - (n + m) / 2)
	fv = 2
	if t == n:
		print(1)
	elif 2 * t == n + m:
		print(2)
	else:
		val = (n - t) / (2 * t - (n + m))
		if val < 0:
			print(2)
		else:
			x = math.floor(val)
			y = math.ceil(val)
			if abs(n + x * (n + m) - t * (2 * x + 1)) * (2 * y + 1) > abs(n + y * (n + m) - t * (2 * y + 1)) * (2 * x + 1):
				fv = y
			else:
				fv = x
			print(2 * fv + 1)


import sys
input = sys.stdin.readline
T = int(input())
for _ in range(T):
	(h, c, t) = list(map(int, input().split()))
	if h + c >= 2 * t:
		print(2)
	else:
		diff2 = 2 * t - (h + c)
		hDiff2 = 2 * h - (h + c)
		kDown = (hDiff2 // diff2 - 1) // 2
		kUp = kDown + 1
		diffDown = abs(diff2 - hDiff2 / (2 * kDown + 1))
		diffUp = abs(diff2 - hDiff2 / (2 * kUp + 1))
		if diffDown <= diffUp:
			print(2 * kDown + 1)
		else:
			print(2 * kDown + 3)


import sys
input = sys.stdin.readline

def print(val):
	sys.stdout.write(str(val) + '\n')

def val(x, h, c):
	return (h - c) / (2 * (x * 2 - 1))

def prog():
	for _ in range(int(input())):
		L = 1
		R = 10 ** 12
		(h, c, t) = map(int, input().split())
		if t <= (h + c) / 2:
			print(2)
		else:
			t -= (h + c) / 2
			while R > L:
				m = (R + L) // 2
				temp = val(m, h, c)
				if temp > t:
					L = m + 1
				else:
					R = m - 1
			left = val(L, h, c)
			if left > t:
				right = val(L + 1, h, c)
				if abs(t - left) <= abs(t - right):
					print(2 * L - 1)
				else:
					print(2 * L + 1)
			else:
				right = val(L - 1, h, c)
				if abs(t - left) >= abs(t - right):
					print(2 * L - 3)
				else:
					print(2 * L - 1)
prog()


t = int(input())
for _ in range(t):
	(h, c, t) = map(int, input().split(' '))
	tb = (h + c) // 2
	if t == h:
		print(1)
	elif t <= tb:
		print(2)
	else:
		k = (t - h) // (h + c - 2 * t)
		if abs(k * (h + c) + h - t * (2 * k + 1)) * (2 * k + 3) <= abs((k + 1) * (h + c) + h - t * (2 * k + 3)) * (2 * k + 1):
			print(2 * k + 1)
		else:
			print(2 * (k + 1) + 1)


tt = int(input())
for _ in range(tt):
	(h, c, t) = list(map(int, input().split(' ')))
	if t >= h:
		print(1)
	elif t <= (c + h) / 2:
		print(2)
	else:
		n = (t - c) / (2 * t - h - c)
		m = int(n) + 1
		nn = int(n)
		e = nn * h + (nn - 1) * c - t * (2 * nn - 1)
		ee = t * (2 * m - 1) - (m * h + (m - 1) * c)
		if e * (2 * m - 1) > ee * (2 * nn - 1):
			print(2 * m - 1)
		else:
			print(2 * nn - 1)


T = int(input())
s = []
for i in range(T):
	s.append(input())
for i in range(T):
	(h, c, t) = map(int, s[i].split())
	if t == h:
		n = 1
	elif t <= (h + c) / 2:
		n = 2
	else:
		k = (c - t) / (h + c - 2 * t)
		n = int(2 * k - 1)
		if n % 2 == 0:
			n = n + 1
		k = (n + 1) / 2
		tb = (k * h + (k - 1) * c) / n
		n1 = n - 2
		k = (n1 + 1) / 2
		tb1 = (k * h + (k - 1) * c) / n1
		n2 = n + 2
		k = (n2 + 1) / 2
		tb2 = (k * h + (k - 1) * c) / n2
		if abs(t - tb1) < abs(t - tb) and abs(t - tb1) < abs(t - tb2):
			n = n1
		if abs(t - tb2) < abs(t - tb) and abs(t - tb2) < abs(t - tb1):
			n = n2
	print(n)


import math
for i in range(int(input())):
	(h, c, t) = map(int, input().split())
	if (h + c) / 2 >= t:
		print(2)
	else:
		a = (h - t) // (2 * t - h - c)
		b = a + 1
		print(2 * a + 1 if 2 * t * (2 * a + 1) * (2 * b + 1) >= (2 * b + 1) * ((a + 1) * h + a * c) + (2 * a + 1) * ((b + 1) * h + b * c) else 2 * b + 1)


for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if h == t:
		print(1)
	else:
		xx = (h + c) / 2
		if xx == t:
			print(2)
		elif xx > t:
			print(2)
		else:
			dif = t - xx
			jj = int(abs((c - h) // (2 * dif)))
			if jj % 2 == 0:
				jj += 1
			if dif - (h - c) / (2 * jj) >= abs(dif - (h - c) / (2 * (jj - 2))):
				print(jj - 2)
			else:
				print(jj)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def IF(c, t, f):
	return t if c else f

def YES(c):
	return IF(c, 'YES', 'NO')

def Yes(c):
	return IF(c, 'Yes', 'No')

def bs(f, mi, ma):
	mm = -1
	while ma > mi:
		mm = (ma + mi) // 2
		if f(mm):
			mi = mm + 1
		else:
			ma = mm
	if f(mm):
		return mm + 1
	return mm

def main():
	t = I()
	rr = []
	for _ in range(t):
		(h, c, t) = LI()
		if h == t:
			rr.append(1)
		elif (h + c) / 2 >= t:
			rr.append(2)
		else:

			def g(i):
				return abs((h + c) * i + h - (i * 2 + 1) * t) / (i * 2 + 1)
			k = int((h - c) / (t - (h + c) / 2) / 4)
			r = 2
			m = abs((h + c) / 2 - t)
			for i in range(max(0, k - 10), k + 10):
				u = g(i)
				if m > u:
					m = u
					r = i * 2 + 1
			rr.append(r)
	return JA(rr, '\n')
print(main())


for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if h <= t:
		print(1)
		continue
	if h + c >= t * 2:
		print(2)
		continue
	lo = 1
	hi = 10 ** 10
	while lo < hi:
		mid = (lo + hi + 1) // 2
		totTemp = mid * h + (mid - 1) * c
		if totTemp // (mid + mid - 1) >= t:
			lo = mid
		else:
			hi = mid - 1
	totTemp = lo * h + (lo - 1) * c
	if totTemp // (lo + lo - 1) < t:
		print(1 / 0)
	a = lo
	b = lo - 1
	totTemp = a * h + b * c
	totTarget = (a + b) * t
	totTemp2 = totTemp + c + h
	totTarget2 = totTarget + t * 2
	if (totTemp - totTarget) * (a + b + 2) <= (totTarget2 - totTemp2) * (a + b):
		print(a + b)
	else:
		print(a + b + 2)


import math
import sys
from fractions import Fraction
input = sys.stdin.readline
ts = int(input())
res = []
for cs in range(ts):
	(h, c, t) = map(int, input().split())
	if 2 * t <= h + c:
		res.append(2)
	else:
		(l, r) = (0, int(1000000000.0))
		while l < r:
			mid = (l + r) // 2
			if (h + c) * mid + h <= t * (mid + mid + 1):
				r = mid
			else:
				l = mid + 1
		opt = l
		init = Fraction(h - c)
		ans = 2
		for i in range(opt - 1, opt + 1):
			if i < 0:
				continue
			if Fraction(t) < Fraction((h + c) * i + h, 2 * i + 1):
				dist = Fraction((h + c) * i + h, 2 * i + 1) - Fraction(t)
			else:
				dist = Fraction(t) - Fraction((h + c) * i + h, 2 * i + 1)
			if dist < init:
				init = dist
				ans = 2 * i + 1
		res.append(ans)
print('\n'.join(map(str, res)))


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import decimal
import math
testcases = int(input())
for j in range(testcases):
	(h, c, t) = map(int, input().split())
	val1 = h + c + t
	if h + c - 2 * t == 0:
		val1 = 2
	val2 = h + c + t
	if h + c - 2 * t != 0:
		val2 = (t - h) / (h + c - 2 * t)
		n1 = (t - h) // (h + c - 2 * t)
		n2 = math.ceil((t - h) / (h + c - 2 * t))
		if abs((2 * n2 + 1) * ((n1 + 1) * h + n1 * c - (2 * n1 + 1) * t)) <= abs((2 * n1 + 1) * ((n2 + 1) * h + n2 * c - (2 * n2 + 1) * t)):
			val2 = max(2 * ((t - h) // (h + c - 2 * t)) + 1, 1)
		else:
			val2 = max(2 * math.ceil((t - h) / (h + c - 2 * t)) + 1, 1)
	val3 = h + c + t
	if t == h:
		val3 = 1
	if abs(t - h) <= abs(t - c):
		print(min(val1, val2, val3))
	else:
		print(2)


ans = []
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if h + c - 2 * t >= 0:
		ans.append(2)
		continue
	a1 = int((t - c) / (2 * t - h - c))
	b1 = a1 - 1
	a2 = int((t - c) / (2 * t - h - c)) + 1
	b2 = a2 - 1
	dt1 = abs(t * (a1 + b1) - (a1 * h + b1 * c)) * (a2 + b2)
	dt2 = abs(t * (a2 + b2) - (a2 * h + b2 * c)) * (a1 + b1)
	if dt1 <= dt2:
		ans.append(a1 + b1)
	else:
		ans.append(a2 + b2)
print('\n'.join(map(str, ans)))


import math
for i in range(int(input())):
	(h, c, t) = map(int, input().split())
	if (h + c) / 2 >= t:
		print(2)
		continue
	if h <= t:
		print(1)
		continue
	left = 1
	right = 1000000000
	while right - left > 1:
		n = (right + left) // 2
		temp_1 = (n * h + (n - 1) * c) / (2 * n - 1)
		if temp_1 <= t:
			right = n
		else:
			left = n
	if abs((left * h + (left - 1) * c) * (2 * right - 1) - t * (2 * left - 1) * (2 * right - 1)) <= abs((right * h + (right - 1) * c) * (2 * left - 1) - t * (2 * right - 1) * (2 * left - 1)):
		print(left * 2 - 1)
	else:
		print(right * 2 - 1)


T = int(input())
for _ in range(T):
	(h, c, t) = map(int, input().split())
	if h <= t:
		print(1)
	elif t <= (h + c) // 2:
		print(2)
	else:
		i1 = (t - h) // (h + c - 2 * t)
		i2 = i1 + 1
		if ((i1 + 1) * h + i1 * c) * (2 * i2 + 1) + ((i2 + 1) * h + i2 * c) * (2 * i1 + 1) <= 2 * t * (2 * i1 + 1) * (2 * i2 + 1):
			ans = 2 * i1 + 1
		else:
			ans = 2 * i2 + 1
		print(ans)


import sys
from array import array

def input():
	return sys.stdin.buffer.readline().decode('utf-8')
tc = int(input())
ans = [0] * tc
for ti in range(tc):
	(h, c, t) = map(int, input().split())
	if abs(3 * t - (h + c + h)) >= abs(3 * t - 3 * h):
		ans[ti] = 1
		continue
	if h + c >= 2 * t:
		ans[ti] = 2
		continue
	(ok, ng) = (1, 10 ** 9)
	while abs(ok - ng) > 1:
		mid = ok + ng >> 1
		if h * (mid + 1) + c * mid >= t * (2 * mid + 1):
			ok = mid
		else:
			ng = mid
	x = ok
	if abs((4 * x ** 2 + 8 * x + 3) * t - (2 * x + 3) * (h * (x + 1) + c * x)) <= abs((4 * x ** 2 + 8 * x + 3) * t - (2 * x + 1) * (h * (x + 2) + c * (x + 1))):
		ans[ti] = 2 * x + 1
	else:
		ans[ti] = 2 * x + 3
sys.stdout.buffer.write('\n'.join(map(str, ans)).encode('utf-8'))


tq = int(input())
for x in range(tq):
	(m, x, y) = list(map(int, input().split()))
	if (m + x) / 2 >= y:
		print(2)
	else:
		k = (m - y) // (2 * y - m - x)
		ta = ((k + 1) * m + k * x) * (2 * k + 3)
		tb = ((k + 2) * m + (k + 1) * x) * (2 * k + 1)
		if abs(tb - y * (2 * k + 1) * (2 * k + 3)) < abs(ta - y * (2 * k + 1) * (2 * k + 3)):
			print(2 * k + 3)
		else:
			print(2 * k + 1)


import sys
input = sys.stdin.readline
flush = sys.stdout.flush
for _ in range(int(input())):
	(h, c, t) = list(map(int, input().split()))
	m = h + c >> 1
	if t <= m:
		print(2)
		continue
	a = (h - t) // (2 * t - h - c)
	b = a + 1
	print(2 * a + 1 if 2 * t * (2 * a + 1) * (2 * b + 1) >= (2 * b + 1) * ((a + 1) * h + a * c) + (2 * a + 1) * ((b + 1) * h + b * c) else 2 * b + 1)


t = int(input())
for _ in range(t):
	(h, c, g) = [int(x) for x in input().split()]
	av = (h + c) / 2
	if g == h:
		print(1)
	elif g <= av + 0.001:
		print(2)
	else:
		n = int((g - h) / (h + c - g * 2))
		best_n = -1
		for j in range(max(n - 3, 0), n + 3):
			if best_n == -1 or abs((best_n + 1) * h + best_n * c - (2 * best_n + 1) * g) * (2 * j + 1) > abs((j + 1) * h + j * c - g * (2 * j + 1)) * (2 * best_n + 1):
				best_n = j
		print(2 * best_n + 1)


import sys
from collections import defaultdict as dd
from collections import deque
from fractions import Fraction as f

def eprint(*args):
	print(*args, file=sys.stderr)
zz = 1
from math import *
import copy
if zz:
	input = sys.stdin.readline
else:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('all.txt', 'w')

def li():
	return [int(x) for x in input().split()]

def fi():
	return int(input())

def si():
	return list(input().rstrip())

def mi():
	return map(int, input().split())

def bo(i):
	return ord(i) - ord('a')
tt = fi()
while tt > 0:
	tt -= 1
	(h, c, t) = mi()
	if t == h:
		print(1)
		continue
	ans = 1
	if abs(h - t) <= abs((h + c) / 2 - t):
		ans = 1
		res = f(h - t)
	else:
		ans = 2
		res = abs(f(h + c, 2) - f(t))
	if 1:
		l = 1
		r = 10 ** 6 + 1
		while l <= r:
			mid = l + (r - l) // 2
			z = f(h * mid + c * (mid - 1), 2 * mid - 1)
			if z <= t:
				if abs(z - t) < res:
					res = abs(z - t)
					ans = 2 * mid - 1
				elif abs(z - t) == res:
					ans = min(ans, 2 * mid - 1)
				r = mid - 1
			else:
				l = mid + 1
				if abs(z - t) < res:
					res = abs(z - t)
					ans = 2 * mid - 1
				elif abs(z - t) == res:
					ans = min(ans, 2 * mid - 1)
		print(ans)


for T in range(int(input())):
	(h, c, x) = list(map(int, input().split()))
	if h == x:
		print(1)
	else:
		av = (h + c) / 2
		if av >= x:
			print(2)
		else:
			n = (h - x) // (2 * x - h - c)
			p = n + 1
			temp = ((h + c) * n + h) * (2 * p + 1)
			temp1 = ((h + c) * p + h) * (2 * n + 1)
			if 2 * x * (2 * p + 1) * (2 * n + 1) >= temp + temp1:
				print(2 * n + 1)
			else:
				print(2 * p + 1)


import sys
q = int(input())
for i in range(q):
	(h, c, t) = [int(j) for j in sys.stdin.readline().split()]
	if t == h:
		print(1)
	elif t <= (h + c) / 2:
		print(2)
	else:
		first = (h + c) / t
		first1 = (h + c) / 2
		second = (h - t) // (2 * t - h - c)
		if second == second + 1:
			if second == 0:
				print(1)
			else:
				print(2)
		else:
			second1 = (h + c) * second + h
			second2 = (h + c) * (second + 1) + h
			min1 = min(abs(t - (h + c) / 2), abs(t * (second * 2 + 1) - second1) / (second * 2 + 1), abs(t * ((second + 1) * 2 + 1) - second2) / ((second + 1) * 2 + 1), abs(t - h))
			if min1 == abs(t - h):
				print(1)
			elif min1 == abs(t - (h + c) / 2):
				print(2)
			elif min1 == abs(t * (second * 2 + 1) - second1) / (second * 2 + 1):
				print(int(second) * 2 + 1)
			elif min1 == abs(t * ((second + 1) * 2 + 1) - second2) / ((second + 1) * 2 + 1):
				print(int(second + 1) * 2 + 1)


cases = int(input())
for i in range(cases):
	l1 = input().split(' ')
	h = int(l1[0])
	c = int(l1[1])
	t = int(l1[2])
	num = 0
	pos1 = (c + h) / 2
	if t <= pos1:
		ans = 2
		print(ans)
	else:
		import math
		check = math.floor((h - t) / (2 * t - h - c))
		if abs(check * (h + c) + h - t * (2 * check + 1)) * (2 * check + 3) <= abs((check + 1) * (h + c) + h - t * (2 * check + 3)) * (2 * check + 1):
			ans = 2 * check + 1
		else:
			ans = 2 * check + 3
		print(ans)


for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if (h + c) // 2 >= t:
		print(2)
	elif h == c:
		print(1)
	else:
		i = (t - c) // (2 * t - h - c)
		p = abs((i * (h + c - 2 * t) + t - c) / (2 * i - 1))
		q = abs(((i + 1) * (h + c - 2 * t) + t - c) / (2 * (i + 1) - 1))
		print(2 * i - 1) if p <= q else print(2 * i + 1)


from sys import stdin, stdout

def mixing_water(h, c, t):
	r1 = 2
	v1 = (h + c) // 2
	if h >= c:
		rv2 = bs1(h, c, t)
	else:
		rv2 = bs2(h, c, t)
	r2 = rv2[0]
	v2 = rv2[1]
	dif = abs(t - v1) - abs(t - v2)
	if dif == 0:
		return min(r1, r2)
	elif dif > 0:
		return r2
	else:
		return r1

def bs1(h, c, t):
	l = 1
	r = 2 ** 31 - 1
	while l < r:
		m = (l + r) // 2
		v1 = ((h + c) * m - c) / (2 * m - 1)
		if v1 > t:
			l = m + 1
		else:
			r = m
	v1 = (h + c) * r - c
	v2 = (h + c) * (r - 1) - c
	t1 = 2 * r - 1
	t2 = 2 * (r - 1) - 1
	if r > 1 and abs(t * t1 * t2 - v2 * t1) <= abs(v1 * t2 - t * t1 * t2):
		return [(r - 1) * 2 - 1, v2 / t2]
	else:
		return [r * 2 - 1, v1 / t1]

def bs2(h, c, t):
	l = 1
	r = 2 ** 31 - 1
	while l < r:
		m = (l + r) // 2
		v1 = ((h + c) * m - c) / (2 * m - 1)
		if v1 < t:
			l = m + 1
		else:
			r = m
	v1 = (h + c) * r - c
	v2 = (h + c) * (r - 1) - c
	t1 = 2 * r - 1
	t2 = 2 * (r - 1) - 1
	if r > 1 and abs(v2 * t1 - t * t1 * t2) <= abs(t * t1 * t2 - v1 * t2):
		return [(r - 1) * 2 - 1, v2 / t2]
	else:
		return [r * 2, v1 / t1]
T = int(stdin.readline())
for i in range(T):
	hct = list(map(int, stdin.readline().split()))
	stdout.write(str(mixing_water(hct[0], hct[1], hct[2])) + '\n')


t = int(input())
for _ in range(t):
	(h, c, t) = map(int, input().split())
	avg = (h + c) / 2
	if t == h:
		print(1)
		continue
	if avg >= t:
		print(2)
		continue
	else:
		n1 = int((t - c) / (2 * t - h - c))
		n2 = 2 * t * (2 * n1 - 1) * (2 * n1 + 1)
		n3 = ((n1 - 1) * (c + h) + h) * (2 * n1 + 1) + (n1 * (c + h) + h) * (2 * n1 - 1)
		if n2 >= n3:
			print(2 * n1 - 1)
		else:
			print(2 * n1 + 1)


from math import gcd
import sys

def input():
	return sys.stdin.readline().rstrip()
dxy = ((-1, 0), (0, -1), (1, 0), (0, 1))

def slv():
	(h, c, t) = map(int, input().split())
	V = []
	if t == h:
		print(1)
		return
	if 2 * t <= h + c:
		print(2)
		return

	def f(k):
		x = h * (k + 1) + c * k
		y = 2 * k + 1
		return (x, y)
	v = (h - t) // (2 * t - h - c)
	if 1 <= v - 1:
		e = f(v - 1)
		V.append((v - 1, e))
	if 1 <= v:
		e = f(v)
		V.append((v, e))
	if 1 <= v + 1:
		e = f(v + 1)
		V.append((v + 1, e))
	V.append((0, f(0)))
	V.append((1, f(1)))
	ans = 0
	dif = (1 << 64, 1)

	def compare(e, f):
		(x, y) = e
		(x1, y1) = f
		if y1 * abs(x - t * y) == y * abs(x1 - t * y1):
			return 1
		if y1 * abs(x - t * y) < y * abs(x1 - t * y1):
			return 0
		else:
			return 2
	for (e, tmp_t) in V:
		if compare(tmp_t, dif) == 1:
			ans = min(ans, 2 * e + 1)
		elif compare(tmp_t, dif) == 0:
			dif = tmp_t
			ans = 2 * e + 1
	print(ans)
	return

def main():
	t = int(input())
	for _ in range(t):
		slv()
	return
main()


import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if h <= t:
		print(1)
	elif (h + c) // 2 >= t:
		print(2)
	else:
		n_c = (h - t) // (2 * t - h - c)
		n_h = n_c + 1
		if abs(n_c * c + n_h * h - t * (n_c + n_h)) * (n_c + n_h + 2) > abs(n_c * c + n_h * h + h + c - t * (n_c + n_h + 2)) * (n_c + n_h):
			print(n_c + n_h + 2)
		else:
			print(n_c + n_h)


import math
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import math
from fractions import Fraction
for i in range(int(input())):
	(a, b, cs) = map(int, input().split())
	if a == cs:
		print(1)
		continue
	elif (a + b) / 2 >= cs:
		print(2)
		continue
	t = math.ceil((cs - b) / (2 * cs - a - b))
	t = int(t)
	cal = Fraction(t * (a + b) - b, 2 * t - 1)
	cala = (a + b) / 2
	t -= 1
	if t > 0:
		calp = Fraction(t * (a + b) - b, 2 * t - 1)
	else:
		calp = -9999999999999999999999
	ans = 2
	if abs(cala - cs) <= abs(cal - cs) and abs(cala - cs) <= abs(calp - cs):
		ans = 2
	elif abs(calp - cs) <= abs(cal - cs) and abs(calp - cs) < abs(cala - cs):
		ans = 2 * t - 1
	elif abs(cal - cs) < abs(cala - cs) and abs(cal - cs) < abs(calp - cs):
		ans = 2 * (t + 1) - 1
	print(ans)


import sys, random, math
from bisect import bisect_left, bisect_right
input = sys.stdin.readline

def main():
	inf = 10 ** 20
	t = int(input())
	for _ in range(1, t + 1):
		(h, c, t) = map(int, input().split())
		if (h + c) / 2 >= t:
			if abs((h + c) / 2 - t) < abs(h - t):
				print(2)
			else:
				print(1)
		else:
			(l, r) = (0, inf)
			close = inf
			while l <= r:
				mid = (l + r) // 2 * 2 + 1
				total = h * (mid // 2 + mid % 2) + c * (mid // 2)
				if total > t * mid:
					l = (l + r) // 2 + 1
				else:
					r = (l + r) // 2 - 1
					close = min(mid, close)
			if close == 1:
				print(1)
				continue
			t0 = h * (close // 2 + close % 2) + c * (close // 2)
			t1 = h * (close // 2 + close % 2 - 1) + c * (close // 2 - 1)

			def gcd(a, b):
				if not b:
					return a
				return gcd(b, a % b)
			lcmab = close // gcd(close, close - 2) * (close - 2)
			if 2 * t * lcmab < t1 * lcmab // (close - 2) + t0 * lcmab // close:
				print(close)
			else:
				print(close - 2)
main()


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
import sys
import random
from queue import PriorityQueue
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
import heapq
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
from itertools import permutations
from math import factorial as f

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p
import sys
from decimal import *
t = int(input())
for _ in range(t):
	(h, c, t) = map(int, input().split())
	ans = 2
	z = (c + h) / 2
	ans1 = abs(t - z)
	fin = ans1
	try:
		z1 = (h - c) / (2 * t - (h + c))
	except:
		print(2)
		continue
	(k1, k2) = (int(z1), ceil(z1))
	hash = defaultdict(list)
	hash[fin].append(2)
	if k1 % 2 == 0 and k1 >= 0:
		k = k1 + 1
		t1 = (h * ((k + 1) // 2) + c * ((k - 1) // 2)) / k
		temp = fin
		fin = min(fin, abs(t - t1))
		if fin == abs(t - t1) and fin != temp:
			hash[fin].append(k)
		if k1 - 1 > 0:
			k = k1 - 1
			t1 = (h * ((k + 1) // 2) + c * ((k - 1) // 2)) / k
			temp = fin
			fin = min(fin, abs(t - t1))
			if fin == abs(t - t1) and fin != temp:
				hash[fin].append(k)
	if k1 % 2 != 0 and k1 > 0:
		k = k1
		t1 = (h * ((k + 1) // 2) + c * ((k - 1) // 2)) / k
		temp = fin
		fin = min(fin, abs(t - t1))
		if fin == abs(t - t1) and fin != temp:
			hash[fin].append(k)
	k1 = k2
	if k1 % 2 == 0 and k1 >= 0:
		k = k1 + 1
		t1 = (h * ((k + 1) // 2) + c * ((k - 1) // 2)) / k
		temp = fin
		fin = min(fin, abs(t - t1))
		if fin == abs(t - t1) and fin != temp:
			hash[fin].append(k)
		if k1 - 1 > 0:
			k = k1 - 1
			t1 = (h * ((k + 1) // 2) + c * ((k - 1) // 2)) / k
			temp = fin
			fin = min(fin, abs(t - t1))
			if fin == abs(t - t1) and fin != temp:
				hash[fin].append(k)
	if k1 % 2 != 0 and k1 > 0:
		k = k1
		t1 = (h * ((k + 1) // 2) + c * ((k - 1) // 2)) / k
		temp = fin
		fin = min(fin, abs(t - t1))
		if fin == abs(t - t1) and fin != temp:
			hash[fin].append(k)
	print(min(hash[fin]))


tt = int(input())
while tt:
	(h, c, t) = map(int, input().split())
	if h == t:
		print(1)
	elif t <= (h + c) / 2:
		print(2)
	else:
		k = (t - c - 1) // (2 * t - h - c)
		ans = 2 * k + 1
		if (4 * k * k - 1) * (2 * t - h - c) >= 2 * (h - c) * k:
			ans -= 2
		print(ans)
	tt -= 1


from bisect import *
from collections import *
from math import gcd, ceil, sqrt, floor, inf
from heapq import *
from itertools import *
from operator import add, mul, sub, xor, truediv, floordiv
from functools import *
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def RL():
	return map(int, sys.stdin.readline().rstrip().split())

def RLL():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def N():
	return int(input())
from types import GeneratorType

def bootstrap(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to
	return wrappedfunc
farr = [1]
ifa = []

def fact(x, mod=0):
	if mod:
		while x >= len(farr):
			farr.append(farr[-1] * len(farr) % mod)
	else:
		while x >= len(farr):
			farr.append(farr[-1] * len(farr))
	return farr[x]

def ifact(x, mod):
	global ifa
	ifa.append(pow(farr[-1], mod - 2, mod))
	for i in range(x, 0, -1):
		ifa.append(ifa[-1] * i % mod)
	ifa = ifa[::-1]

def per(i, j, mod=0):
	if i < j:
		return 0
	if not mod:
		return fact(i) // fact(i - j)
	return farr[i] * ifa[i - j] % mod

def com(i, j, mod=0):
	if i < j:
		return 0
	if not mod:
		return per(i, j) // fact(j)
	return per(i, j, mod) * ifa[j] % mod

def catalan(n):
	return com(2 * n, n) // (n + 1)

def isprime(n):
	for i in range(2, int(n ** 0.5) + 1):
		if n % i == 0:
			return False
	return True

def lowbit(n):
	return n & -n

def inverse(a, m):
	a %= m
	if a <= 1:
		return a
	return (1 - inverse(m, a) * m) // a % m

class BIT:

	def __init__(self, arr):
		self.arr = arr
		self.n = len(arr) - 1

	def update(self, x, v):
		while x <= self.n:
			self.arr[x] += v
			x += x & -x

	def query(self, x):
		ans = 0
		while x:
			ans += self.arr[x]
			x &= x - 1
		return ans

class DSU:

	def __init__(self, n):
		self.c = [-1] * n

	def same(self, x, y):
		return self.find(x) == self.find(y)

	def find(self, x):
		if self.c[x] < 0:
			return x
		self.c[x] = self.find(self.c[x])
		return self.c[x]

	def union(self, u, v):
		(u, v) = (self.find(u), self.find(v))
		if u == v:
			return False
		if self.c[u] < self.c[v]:
			(u, v) = (v, u)
		self.c[u] += self.c[v]
		self.c[v] = u
		return True

	def size(self, x):
		return -self.c[self.find(x)]

class UFS:

	def __init__(self, n):
		self.parent = [i for i in range(n)]
		self.ranks = [0] * n

	def find(self, x):
		if x != self.parent[x]:
			self.parent[x] = self.find(self.parent[x])
		return self.parent[x]

	def union(self, u, v):
		(pu, pv) = (self.find(u), self.find(v))
		if pu == pv:
			return False
		if self.ranks[pu] >= self.ranks[pv]:
			self.parent[pv] = pu
			if self.ranks[pv] == self.ranks[pu]:
				self.ranks[pu] += 1
		else:
			self.parent[pu] = pv

def Prime(n):
	c = 0
	prime = []
	flag = [0] * (n + 1)
	for i in range(2, n + 1):
		if not flag[i]:
			prime.append(i)
			c += 1
		for j in range(c):
			if i * prime[j] > n:
				break
			flag[i * prime[j]] = prime[j]
			if i % prime[j] == 0:
				break
	return flag

def dij(s, graph):
	d = {}
	d[s] = 0
	heap = [(0, s)]
	seen = set()
	while heap:
		(dis, u) = heappop(heap)
		if u in seen:
			continue
		for v in graph[u]:
			if v not in d or d[v] > d[u] + graph[u][v]:
				d[v] = d[u] + graph[u][v]
				heappush(heap, (d[v], v))
	return d

def GP(it):
	return [[ch, len(list(g))] for (ch, g) in groupby(it)]

class DLN:

	def __init__(self, val):
		self.val = val
		self.pre = None
		self.next = None

def nb(i, j):
	for (ni, nj) in [[i + 1, j], [i - 1, j], [i, j - 1], [i, j + 1]]:
		if 0 <= ni < n and 0 <= nj < m:
			yield (ni, nj)

@bootstrap
def gdfs(r, p):
	if len(g[r]) == 1 and p != -1:
		yield None
	for ch in g[r]:
		if ch != p:
			yield gdfs(ch, r)
	yield None
t = N()
for i in range(t):
	(h, c, t) = RL()
	if t >= h:
		ans = 1
	elif t <= (h + c) / 2:
		ans = 2
	else:
		k = (h - t) // (2 * t - h - c)
		ma = (h + k * (h + c)) * (2 * k + 3)
		mi = (h + (k + 1) * (h + c)) * (2 * k + 1)
		t *= (2 * k + 1) * (2 * k + 3)
		if abs(ma - t) <= abs(mi - t):
			ans = k * 2 + 1
		else:
			ans = k * 2 + 3
	print(ans)


MOD = 10 ** 9 + 7
INT_MAX = 10 ** 20 + 7

def INPUT():
	return list((float(i) for i in input().split()))

def LIST_1D_ARRAY(n):
	return [0 for _ in range(n)]

def LIST_2D_ARRAY(m, n):
	return [[0 for _ in range(n)] for _ in range(m)]

def power(a, x):
	res = 1
	while x > 0:
		if x & 1:
			res = res * a % MOD
		a = a * a % MOD
		x //= 2
	return res % MOD

def NCR_MOD(n, r):
	num = 1
	for i in range(n, n - r, -1):
		num = num * i % MOD
	for j in range(1, r + 1):
		num = num * power(j, MOD - 2) % MOD
	return num
import math

def F(h, c, t, y):
	return abs((c + h - 2 * t) * y + (h - t)) / (2 * y + 1)

def calc(h, c, t):
	if h == t:
		return 1
	if h + c >= 2 * t:
		return 2
	rest = INT_MAX
	q = (h - t) / (2 * t - h - c)
	if int(q) != q:
		f = int(q)
		s = f + 1
		if F(h, c, t, f) <= F(h, c, t, s):
			return 2 * f + 1
		else:
			return 2 * s + 1
	else:
		return int(2 * q + 1)
for i in range(int(input())):
	(h, c, t) = INPUT()
	print(calc(h, c, t))


import os
import sys
if os.path.exists('/mnt/c/Users/Square/square/codeforces'):
	_f = iter(open('C.txt').readlines())

	def input():
		return next(_f)
else:
	input = lambda : sys.stdin.readline().strip()
fprint = lambda *args: print(*args, flush=True)
import functools
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	m = (h + c) / 2
	if t <= m:
		print(2)
		continue
	elif t >= h:
		print(1)
		continue
	x = int((t - c) / (2 * t - h - c))
	y = x + 1
	if abs(x * h + (x - 1) * c - t * (2 * x - 1)) * (2 * y - 1) <= abs(y * h + (y - 1) * c - t * (2 * y - 1)) * (2 * x - 1):
		print(2 * x - 1)
	else:
		print(2 * y - 1)


from collections import Counter
import math
import sys
from bisect import bisect, bisect_left, bisect_right

def input():
	return sys.stdin.readline().strip()

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def mod():
	return 10 ** 9 + 7
for _ in range(INT()):
	(h, c, t) = MAP()
	if h == t:
		print(1)
	elif (h + c) / 2 >= t:
		print(2)
	else:
		x = (t - c) // (2 * t - h - c)
		y = x + 1
		ans1 = abs(x * h + (x - 1) * c + t * (1 - 2 * x)) / (2 * x - 1)
		ans2 = abs(y * h + (y - 1) * c + t * (1 - 2 * y)) / (2 * y - 1)
		if ans1 <= ans2:
			print(2 * x - 1)
		else:
			print(2 * y - 1)


import math
from sys import stdin, stdout
import sys
import fractions
mod = 1000000007
F = fractions.Fraction
t = int(stdin.readline())
while t > 0:
	(h, c, tt) = list(map(int, stdin.readline().split()))
	mini = sys.maxsize
	ans = 0
	xx = []
	if 2 * tt > h + c:
		xx.append((h - tt) // (2 * tt - (h + c)))
		xx.append((h - tt) // (2 * tt - (h + c)) + 1)
		for x in xx:
			delta = F(h * (x + 1) + c * x, 2 * x + 1)
			if mini > abs(tt - delta):
				mini = abs(tt - delta)
				ans = 2 * x + 1
	else:
		ans = 2
	stdout.write(f'{ans}\n')
	t -= 1


from math import *
from io import BytesIO, IOBase
import sys
import os

def Iint():
	return int(input())

def Ilist():
	return list(map(int, input().split()))

def Imap():
	return map(int, input().split())

def Plist(li, s=' '):
	print(s.join(map(str, li)))

def main():
	t = Iint()
	for _ in range(t):
		(h, c, t) = Imap()
		mid = (h + c) / 2
		if t <= mid:
			print(2)
			continue
		x1 = (h - t) // (2 * t - h - c)
		x2 = x1 + 1
		t1 = ((x1 + 1) * h + x1 * c) * (2 * x2 + 1)
		t2 = ((x2 + 1) * h + x2 * c) * (2 * x1 + 1)
		t *= (2 * x2 + 1) * (2 * x1 + 1)
		if abs(t1 - t) - abs(t2 - t) > 0:
			print(2 * x2 + 1)
		else:
			print(2 * x1 + 1)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


from decimal import Decimal
t = int(input())
for _ in range(t):
	(h, c, t) = map(int, input().split())
	if t <= (h + c) / 2:
		print(2)
		continue
	if h < t:
		print(1)
		continue
	amt = 1
	k = 500000 // 2
	while k > 0:
		while (amt + k) * h + (amt + k - 1) * c > t * (amt + k + (amt + k) - 1):
			amt += k
		k //= 2
	l = abs(Decimal(amt * h + (amt - 1) * c) / Decimal(2 * amt - 1) - t)
	o = abs(Decimal((amt + 1) * h + (amt + 1 - 1) * c) / Decimal(2 * (amt + 1) - 1) - t)
	if l <= o:
		print(2 * amt - 1)
	else:
		print(2 * (amt + 1) - 1)


def t_on_move(move):
	return (move * h + (move - 1) * c) / (2 * move - 1)
for _ in range(int(input())):
	(h, c, t) = list(map(int, input().split()))
	even_val = (h + c) // 2
	l = 0
	r = 2000000000
	while r - l > 1:
		m = (l + r) // 2
		m_val = t_on_move(m)
		if m_val > t:
			l = m
		else:
			r = m
	delta = abs(t - (h + c) / 2)
	ans = 2
	if l > 0:
		if (r * h + (r - 1) * c) * (2 * l - 1) - t * (2 * r - 1) * (2 * l - 1) > -(l * h + (l - 1) * c) * (2 * r - 1) + t * (2 * r - 1) * (2 * l - 1):
			if delta > abs(t - t_on_move(r)):
				ans = 2 * r - 1
		elif delta > abs(t - t_on_move(l)):
			ans = 2 * l - 1
	elif delta > abs(t - t_on_move(r)):
		ans = 2 * r - 1
	print(ans)


import math
test = int(input())
for _ in range(test):
	(h, c, t) = map(int, input().split())
	if t == h:
		print(1)
	elif t <= (h + c) // 2:
		print(2)
	else:
		l = 1
		r = 2 ** 31 - 1
		flag = True
		while l < r:
			mid = (l + r) // 2
			if (h + c) * mid + h == t * (2 * mid + 1):
				print(2 * mid + 1)
				flag = False
				break
			elif (h + c) * mid + h > t * (2 * mid + 1):
				l = mid + 1
			else:
				r = mid - 1
		if flag:
			l = max(0, l - 3)
			r = r + 3
			diff = l
			for i in range(l, r):
				if abs((h + c) * i + h - t * (2 * i + 1)) * (2 * diff + 1) < abs((h + c) * diff + h - t * (2 * diff + 1)) * (2 * i + 1):
					diff = i
			print(2 * diff + 1)


import sys
input = sys.stdin.buffer.readline

def print(*val):
	sys.stdout.write(str(*val) + '\n')
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if h <= t:
		print(1)
	elif (h + c) // 2 >= t:
		print(2)
	else:
		n_c = (h - t) // (2 * t - h - c)
		n_h = n_c + 1
		if abs(n_c * c + n_h * h - t * (n_c + n_h)) * (n_c + n_h + 2) > abs(n_c * c + n_h * h + h + c - t * (n_c + n_h + 2)) * (n_c + n_h):
			print(n_c + n_h + 2)
		else:
			print(n_c + n_h)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(h, c, temp) = map(int, input().split())
	ave_temp = (h + c) / 2
	if temp <= ave_temp:
		print(2)
	elif h == temp:
		print(1)
	else:
		u = (h - c) / ((temp - ave_temp) * 2)
		u_l = int(u)
		if int(u) % 2 == 1:
			u1 = u_l
			u2 = u_l + 2
		else:
			u1 = u_l - 1
			u2 = u_l + 1
		if abs(temp - ave_temp - (h - c) / (u1 * 2)) <= abs(temp - ave_temp - (h - c) / (u2 * 2)):
			print(u1)
		else:
			print(u2)


import sys
input = sys.stdin.readline
from fractions import Fraction
from math import floor, ceil
Decimal = Fraction

def calc_temp(cups, h, c):
	if cups <= 0:
		return 0
	if cups % 2 == 0:
		return (h * (cups / 2) + c * (cups / 2)) / cups
	else:
		return Decimal(h * (cups // 2 + 1) + c * (cups // 2)) / Decimal(cups)

def solve(h, c, t):
	if t >= h:
		return 1
	elif t <= (h + c) / 2:
		return 2
	else:
		x = (c - t) / (h + c - 2 * t)
		lower = max(floor(x), 1)
		upper = ceil(x) + 2
		best_abs = float('inf')
		best_cups = None
		t = Decimal(t)
		for i in range(lower, upper):
			t_b = calc_temp(2 * i - 1, h, c)
			diff = abs(t_b - t)
			if diff < best_abs:
				best_abs = diff
				best_cups = 2 * i - 1
		return best_cups
res = []
t = int(input())
for _ in range(t):
	(h, c, t) = map(int, input().split())
	res.append(solve(h, c, t))
for r in res:
	print(r)


import math
tt = int(input())
for test in range(tt):
	(h, c, t) = map(int, input().split())
	if t <= (h + c) / 2:
		print(2)
	else:
		k = (h - t) // (2 * t - h - c)
		if abs(k * (h + c) + h - t * (2 * k + 1)) * (2 * k + 3) <= abs((k + 1) * (h + c) + h - t * (2 * k + 3)) * (2 * k + 1):
			print(2 * k + 1)
		else:
			print(2 * k + 3)


import sys
from fractions import Fraction

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 10
MOD = 10 ** 9 + 7
EPS = 10 ** (-10)

def bisearch_max(mn, mx, func):
	ok = mn
	ng = mx
	while ok + 1 < ng:
		mid = (ok + ng) // 2
		if func(mid):
			ok = mid
		else:
			ng = mid
	return ok

def check(m):
	res = h * (m + 1) + c * m
	return res >= t * (m * 2 + 1)
for _ in range(INT()):
	(h, c, t) = MAP()
	ev = (h + c) / 2
	res = bisearch_max(0, 10 ** 10, check)
	if res == 10 ** 10 - 1:
		print(2)
	else:
		mn = INF
		ans = -1
		for m in range(res, res + 2):
			res = h * (m + 1) + c * m
			diff = Fraction(abs(res - t * (m * 2 + 1)), t * (m * 2 + 1))
			if diff < mn:
				mn = diff
				ans = m * 2 + 1
		print(ans)


for tt in range(int(input())):
	(h, c, t) = map(int, input().split())
	if t <= (h + c) // 2:
		print(2)
	else:
		num = int((t - h) / (h + c - 2 * t))
		num = 2 * num + 1
		if num % 2:
			op1 = num
			op2 = num + 2
			c1 = abs((op1 // 2 + 1) * h + op1 // 2 * c - t * op1)
			c2 = abs((op2 // 2 + 1) * h + op2 // 2 * c - t * op2)
			if c1 * op2 <= c2 * op1:
				print(op1)
			else:
				print(op2)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from math import gcd, ceil

def pre(s):
	n = len(s)
	pi = [0] * n
	for i in range(1, n):
		j = pi[j - 1]
		while j and s[i] != s[j]:
			j = pi[j - 1]
		if s[i] == s[j]:
			j += 1
		pi[i] = j
	return pi

def prod(a):
	ans = 1
	for each in a:
		ans = ans * each
	return ans

def lcm(a, b):
	return a * b // gcd(a, b)

def binary(x, length=16):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y

def solve(h, c, t):

	def temp(x):
		return abs((t * (2 * x + 1) - ((x + 1) * h + x * c)) / (2 * x + 1))
	if t <= (h + c) // 2:
		return 2
	(L, R) = (0, 10000000.0)
	while R != L:
		s = (R - L) // 3
		m1 = L + s
		m2 = R - s
		if temp(m2) >= temp(m1):
			R = m2 - 1
		else:
			L = m1 + 1
	return int(2 * R + 1)
T = int(input())
while T:
	(h, c, t) = map(int, input().split())
	print(solve(h, c, t))
	T -= 1


a = int(input())
from fractions import Fraction
import sys
input = sys.stdin.readline
for i in range(a):
	(h, c, t) = map(int, input().split())
	se = (h + c) / 2
	if h == c:
		print(1)
	elif t <= se:
		print(2)
	elif t > se:
		x = h - t
		y = 2 * (t - se)
		if x % y == 0:
			z = int(x // y)
			print(2 * z + 1)
			continue
		else:
			z = int(x // y) + 1
		num1 = abs(z * c + (z + 1) * h)
		dum1 = abs(2 * z + 1)
		if z >= 0:
			z -= 1
			num2 = abs(z * c + (z + 1) * h)
			dum2 = abs(2 * z + 1)
			if t * dum2 > num2:
				if num2 * dum1 <= dum2 * num1:
					print(2 * z + 1)
				else:
					print(2 * z + 3)
			elif t * dum2 == num2:
				print(2 * z + 1)
			elif num2 * dum1 + num1 * dum2 <= 2 * t * (dum2 * dum1):
				print(2 * z + 1)
			else:
				print(2 * z + 3)
		else:
			print(2 * z + 1)


import sys
import math
import heapq
import collections

def inputnum():
	return int(input())

def inputnums():
	return map(int, input().split())

def inputlist():
	return list(map(int, input().split()))

def inputstring():
	return [x for x in input()]

def inputmatrix(rows):
	arr2d = [[j for j in input().strip()] for i in range(rows)]
	return arr2d
t = int(input())
for q in range(t):
	(h, c, t) = inputnums()
	if t == h:
		print(1)
	elif t <= (h + c) / 2:
		print(2)
	else:
		x = h - (h + c) / 2
		y = t - (h + c) / 2
		a = math.ceil(x / y)
		b = math.floor(x / y)
		if a % 2 == 0:
			a += 1
		if b % 2 == 0:
			b -= 1
		if abs(x / a - y) < abs(x / b - y):
			print(a)
		else:
			print(b)


import math
import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	e = 1000001
	x = 1
	if t > (c + h) / 2:
		a = t - (c + h) / 2
		x = math.ceil(((h - c) / (2 * a) + 1) / 2)
		q = x - 1
		if abs(t - (c + h) / 2 - (h - c) / (4 * q - 2)) <= abs(t - (c + h) / 2 - (h - c) / (4 * x - 2)):
			print(2 * q - 1)
		else:
			print(2 * x - 1)
	else:
		print(2)


from sys import stdin
input = stdin.readline
q = int(input())
for _ in range(q):
	(h, c, t) = map(int, input().split())
	if 2 * t <= h + c:
		print(2)
	else:
		t *= 2
		h *= 2
		c *= 2
		w = h // 2 - c // 2
		pod = (h + c) // 2
		goal = t - pod
		if goal == 0:
			print(1)
		else:
			x = w // goal
			wynik = 2
			mini = 23649823847238
			for szkl in range(x - 3, x + 4):
				if szkl % 2 == 1 and szkl >= 1 and (abs(goal - w / szkl) < mini):
					mini = abs(goal - w / szkl)
					wynik = szkl
			print(wynik)


_ = int(input())
for T in range(_):
	(h, c, t) = [int(x) for x in input().split()]
	if t <= (h + c) / 2:
		print(2)
		continue
	x = (t - c) // (2 * t - h - c)
	v1 = x * h + (x - 1) * c
	v2 = (x + 1) * h + x * c
	if abs(v1 - (2 * x - 1) * t) / (2 * x - 1) <= abs(t * (2 * x + 1) - v2) / (2 * x + 1):
		print(2 * x - 1)
	else:
		print(2 * x + 1)


from sys import stdin, gettrace
if not gettrace():

	def input():
		return next(stdin)[:-1]

def main():

	def solve():
		(h, c, t) = map(int, input().split())
		if t <= (h + c) / 2:
			print(2)
			return
		if t >= h:
			print(1)
			return
		m = (h - t) // (2 * t - h - c)
		t1n = (m + 1) * h + m * c
		t2n = (m + 2) * h + (m + 1) * c
		t1d = 2 * m + 1
		t2d = 2 * m + 3
		if abs(t1n * t2d - t * t1d * t2d) <= abs(t2n * t1d - t * t1d * t2d):
			print(2 * m + 1)
		else:
			print(2 * m + 3)
	q = int(input())
	for _ in range(q):
		solve()
main()


from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict
from bisect import bisect_left
from bisect import bisect_right

def L():
	return list(map(int, stdin.readline().split()))

def In():
	return map(int, stdin.readline().split())

def I():
	return int(stdin.readline())

def seive():
	l = 100002
	c = [1, 1] + [0] * l
	for i in range(2, l):
		if 1 - c[i]:
			for j in range(i * i, l, i):
				c[j] = 1

def binarySearch(arr, l, r, x):
	if r >= l:
		mid = l + (r - l) // 2
		if arr[mid] == x:
			return mid
		elif arr[mid] > x:
			return binarySearch(arr, l, mid - 1, x)
		else:
			return binarySearch(arr, mid + 1, r, x)
	else:
		return -1
P = 1000000007

def main():
	for _ in range(I()):
		(h, c, t) = In()
		if (h + c) / 2 >= t:
			print(2)
		else:
			a = (h - t) // (2 * t - h - c)
			b = a + 1
			if 2 * t * (2 * a + 1) * (2 * b + 1) >= (2 * b + 1) * ((a + 1) * h + a * c) + (2 * a + 1) * ((b + 1) * h + b * c):
				print(2 * a + 1)
			else:
				print(2 * b + 1)
main()


for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if h + c - 2 * t >= 0:
		print(2)
		continue
	else:
		a = h - t
		b = 2 * t - h - c
		k = a // b
		if abs(k * (h + c) + h - t * (2 * k + 1)) * (2 * k + 3) <= abs((k + 1) * (h + c) + h - t * (2 * k + 3)) * (2 * k + 1):
			print(2 * k + 1)
		else:
			print(2 * k + 3)


from math import floor
inp = input
getans = lambda a, b, x, y: (a * x + b * y, x + y)
for _ in range(int(inp())):
	(h, c, t) = map(int, inp().strip().split(' '))
	if h == t:
		print(1)
	elif (h + c) / 2 >= t:
		print(2)
	else:
		x = floor((c - t) / (h + c - 2 * t))
		if x == 0:
			x = 1
		y = x - 1
		(ans1, d1) = getans(h, c, x, y)
		(ans2, d2) = getans(h, c, x + 1, y + 1)
		ab1 = abs(ans1 - t * d1) * d2
		ab2 = abs(ans2 - t * d2) * d1
		if ab1 <= ab2:
			print(x + y)
		else:
			print(x + y + 2)


from decimal import *

def value(n, h, c, t):
	getcontext().prec = 100
	a = Decimal(n * h + (n - 1) * c) / Decimal(2 * n - 1)
	return abs(a - Decimal(t))
t = int(input())
for i in range(t):
	(h, c, t) = list(map(float, input().split()))
	if t == h:
		print(1)
	elif t - (h + c) / 2 <= 0:
		print(2)
	else:
		option1 = abs(t - (h + c) / 2)
		n = (t - c) / (2 * t - h - c)
		n2 = int(n)
		n3 = n2 + 1
		option2 = value(n2, h, c, t)
		option3 = value(n3, h, c, t)
		lst = [option1, option2, option3]
		ans = min(lst)
		if ans == option1:
			print(2)
		elif ans == option2:
			print(2 * n2 - 1)
		elif ans == option3:
			print(2 * n3 - 1)


T = int(input())
for _ in range(T):
	(h, c, t) = map(int, input().split())
	s = (h + c) / 2
	if s >= t:
		print(2)
		continue
	s = t - s
	a = (h - c) / (2 * s)
	k = int((a + 1) // 2)
	if (h - c) / (4 * k - 2) - s <= s - (h - c) / (4 * k + 2):
		print(2 * k - 1)
	else:
		print(2 * k + 1)


import math
from decimal import *
from sys import stdin, stdout
T = int(input())

def calc(x, y, n, m):
	n = Decimal(n)
	m = Decimal(m)
	return (x * n + y * m) / (n + m)

def bs(x, y, t):
	lo = 1
	hi = 1000000000
	while lo <= hi:
		mid = int((lo + hi) / 2)
		ret = calc(x, y, mid, mid - 1)
		if ret <= t:
			hi = mid - 1
		else:
			lo = mid + 1
	return hi
while T != 0:
	(h, c, t) = stdin.readline().split(' ')
	c = Decimal(c)
	h = Decimal(h)
	t = Decimal(t)
	y2 = bs(h, c, t)
	d1 = abs(t - calc(h, c, 1, 0))
	d2 = abs(t - calc(h, c, 1, 1))
	d3 = abs(t - calc(h, c, y2, y2 - 1))
	d4 = abs(t - calc(h, c, y2 + 1, y2))
	mn = min(d1, d2, d3, d4)
	ans = -1
	if mn == d1:
		ans = 1
	elif mn == d2:
		ans = 2
	elif mn == d3:
		ans = 2 * y2 - 1
	else:
		ans = 2 * y2 + 1
	stdout.write(str(ans) + '\n')
	T = T - 1


from sys import stdin
input = stdin.readline
INF = 10 ** 9 + 7
MAX = 10 ** 7 + 7
MOD = 10 ** 9 + 7
for Ti in range(int(input().strip())):
	(h, c, t) = [int(x) for x in input().strip().split()]
	avg = (h + c) / 2
	if t <= avg:
		print('2')
		continue
	ti = (t - h) // (h + c - 2 * t)
	l = (2 * ti + 3) * (ti * (h + c) + h - 2 * ti * t - t)
	r = (2 * ti + 1) * ((ti + 1) * (h + c) + h - 2 * ti * t - 3 * t)
	if abs(l) <= abs(r):
		print(2 * ti + 1)
	else:
		print(2 * ti + 3)


from decimal import *
cases = int(input())

def get_delta(h, t, x):
	return h * (1 + x) / (1 + 2 * x) - t
for _ in range(cases):
	(h, c, t) = [int(x) for x in input().split()]
	if t <= (h + c) / 2:
		print(2)
		continue
	h = h - c
	t = t - c
	x = 0
	delta = get_delta(h, t, x)
	while delta > 0:
		if x == 0:
			x = 1
		else:
			x *= 2
		delta = get_delta(h, t, x)
	lo = x // 2
	hi = x
	while lo + 1 < hi:
		mid = (hi - lo) // 2 + lo
		delta = get_delta(h, t, mid)
		if delta > 0:
			lo = mid
		else:
			hi = mid
	if abs(get_delta(Decimal(h), Decimal(t), lo)) <= abs(get_delta(Decimal(h), Decimal(t), hi)):
		x = lo
	else:
		x = hi
	print(1 + 2 * x)


import sys, math
Tests = int(input())
for _ in range(Tests):
	(h, c, t) = map(int, sys.stdin.readline().split())
	if h == t:
		print(1)
	else:
		x = (h + c) / 2
		if x >= t:
			print(2)
		else:
			k = (h - t) // (2 * t - h - c)
			if abs(k * (h + c) + h - t * (2 * k + 1)) * (2 * k + 3) <= abs((k + 1) * (h + c) + h - t * (2 * k + 3)) * (2 * k + 1):
				print(2 * k + 1)
			else:
				print(2 * (k + 1) + 1)


for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if 2 * t <= h + c:
		print(2)
		continue
	x = (h - t) // (2 * t - h - c)
	k = 2 * x + 1
	val1 = abs(k // 2 * c + (k + 1) // 2 * h - t * k)
	val2 = abs((k + 2) // 2 * c + (k + 3) // 2 * h - t * (k + 2))
	print(k if val1 * (k + 2) <= val2 * k else k + 2)


from math import ceil, floor
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if t == h:
		print(1)
	elif t <= (h + c) / 2:
		print(2)
	else:
		f = (h - t) / (2 * t - h - c)
		val1 = (c * ceil(f) + (ceil(f) + 1) * h - t * (2 * ceil(f) + 1)) * (2 * floor(f) + 1)
		val2 = (c * floor(f) + (floor(f) + 1) * h - t * (2 * floor(f) + 1)) * (2 * ceil(f) + 1)
		if abs(val1) < abs(val2):
			print(2 * ceil(f) + 1)
		else:
			print(2 * floor(f) + 1)


t = int(input())
for _ in range(t):
	(h, c, t) = list(map(int, input().split()))
	av = (h + c) / 2
	if h == c:
		print(1)
	elif t <= av:
		print(2)
	else:
		d = (t - av) / (h - av)
		k = -(-(h - av) // (t - av))
		if k == (h - av) / (t - av):
			k += 1
		if k % 2 == 0:
			k += 1
		k = int(k)
		av_max_k = (h - av) / k
		av_min_k = (h - av) / (k - 2)
		d_max_k = abs(t - av - av_max_k)
		d_min_k = abs(t - av - av_min_k)
		res = k - 2 if d_min_k <= d_max_k else k
		print(res)


import sys
import math
from decimal import *
t = int(sys.stdin.readline().strip())
for i in range(t):
	(h, c, t) = list(map(int, sys.stdin.readline().strip().split(' ')))
	mid = Decimal(c + (h - c) / 2)
	if h == t:
		print(1)
	elif t <= mid:
		print(2)
	else:
		b = int((h - mid) / (t - mid))
		if b % 2 == 0:
			low = b - 1
			high = b + 1
		else:
			low = b
			high = b + 2
		res = None
		u = abs(mid + (h - mid) / low - t)
		v = abs(mid + (h - mid) / high - t)
		if u <= v:
			res = low
		else:
			res = high
		print(res)


def solver(h, c, t):
	if h + c >= 2 * t:
		return 2
	elif h == t:
		return 1
	else:
		x = (t - c) // (2 * t - h - c)
		(k1, k2) = (abs((2 * x - 1) * t - ((h + c) * x - c)) * (2 * x + 1), abs(t * (2 * x + 1) - ((h + c) * x + h)) * (2 * x - 1))
		z = 2 * x + 1 if k2 < k1 else 2 * x - 1
		return z
for _ in range(int(input())):
	(H, C, T) = [int(i) for i in input().split()]
	print(solver(H, C, T))


for i in range(int(input())):
	(h, c, t) = map(int, input().split())
	if h + c >= 2 * t:
		print(2)
	elif h == t:
		print(1)
	else:
		x = int((t - c) / (2 * t - h - c))
		tb1 = abs((2 * x - 1) * t - ((h + c) * x - c)) * (2 * x + 1)
		tb2 = abs(t * (2 * x + 1) - ((h + c) * x + h)) * (2 * x - 1)
		if tb2 < tb1:
			z = x + 1 + x
		else:
			z = x + x - 1
		print(z)


import os
import sys
import math
from io import BytesIO, IOBase
from fractions import Fraction
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for t in range(int(input())):
	(a, b, c) = map(int, input().split())
	c1 = 0
	c2 = 0
	c3 = 0
	c1 = (a + b) / 2
	d1 = abs(c1 - c)
	r = 2
	d2 = c
	d3 = c
	if d1 != 0:
		x = (a - c) / (2 * c - a - b)
		x = math.floor(x)
		c2 = Fraction(a * (x + 1) + b * x, 2 * x + 1)
		d2 = abs(c2 - c)
		y = x + 1
		c3 = Fraction(a * (y + 1) + b * y, 2 * y + 1)
		d3 = abs(c3 - c)
		z = 0
		c4 = 0
		d4 = c
		if x > 0:
			z = x - 1
			c4 = Fraction(a * (z + 1) + b * z, 2 * z + 1)
			d4 = abs(c4 - c)
		l = list()
		l.append((d1, 2))
		l.append((d2, 2 * x + 1))
		l.append((d3, 2 * y + 1))
		l.append((d4, 2 * z + 1))
		l.sort()
		r = l[0][1]
	if c <= c1:
		r = 2
	if c == a:
		r = 1
	print(r)


import sys
input = sys.stdin.readline
from collections import *

def judge(x):
	return h * (2 * x + 1) - x * (h - c) >= (2 * x + 1) * t

def binary_search():
	(l, r) = (0, 10 ** 18)
	while l <= r:
		m = (l + r) // 2
		if judge(m):
			l = m + 1
		else:
			r = m - 1
	return r
T = int(input())
for _ in range(T):
	(h, c, t) = map(int, input().split())
	if 2 * t <= h + c:
		print(2)
		continue
	if t == h:
		print(1)
		continue
	b = binary_search()
	if 2 * (2 * b + 1) * (2 * b + 3) * t >= 2 * (2 * b + 1) * (2 * b + 3) * h - b * (2 * b + 3) * (h - c) - (b + 1) * (2 * b + 1) * (h - c):
		print(1 + 2 * b)
	else:
		print(1 + 2 * (b + 1))


for ti in range(int(input())):
	(h, c, t) = map(int, input().split())
	if t <= (h + c) / 2:
		print(2)
	else:
		k = (h - t) // (2 * t - h - c)
		if abs((2 * k + 3) * t - k * h - 2 * h - k * c - c) * (2 * k + 1) < abs((2 * k + 1) * t - k * h - h - k * c) * (2 * k + 3):
			print(2 * k + 3)
		else:
			print(2 * k + 1)


cases = int(input())
for _ in range(cases):
	(h, c, t) = [int(x) for x in input().split()]
	if t <= (h + c) / 2:
		print(2)
		continue
	n = (t - h) / (h + c - 2 * t)
	(x, y) = (int(n), int(n) + 1)
	xx = (x + 1) * h + x * c
	yy = (y + 1) * h + y * c
	if xx * (2 * y + 1) + yy * (2 * x + 1) <= 2 * t * (2 * y + 1) * (2 * x + 1):
		print(2 * x + 1)
	else:
		print(2 * y + 1)


for _ in range(int(input())):
	(h, c, t) = [int(x) for x in input().split()]
	if t == h:
		print(1)
	elif (h + c) / 2 >= t:
		print(2)
	else:
		m = int((t - c) / (2 * t - c - h))
		temp = abs((m * (h + c - 2 * t) + t - c) / (2 * m - 1))
		temp1 = abs(((m + 1) * (h + c - 2 * t) + t - c) / (2 * (m + 1) - 1))
		print(2 * m - 1 if temp <= temp1 else 2 * m + 1)


import math

def solve():
	T = int(input())
	while T > 0:
		hct = input().split()
		h = int(hct[0])
		c = int(hct[1])
		t = int(hct[2])
		if t <= (h + c) / 2:
			print(2)
		else:
			k1 = math.ceil((t - c) / (2 * t - h - c))
			k2 = math.floor((t - c) / (2 * t - h - c))
			if k2 == 0:
				print(2 * k1 - 1)
			else:
				le = 2 * k1 * k2 * (2 * t - h - c) + 2 * k2 * (c - t) - k1 * (2 * t - h - c) + (t - c)
				rg = 2 * k1 * k2 * (h + c - 2 * t) + 2 * k1 * (t - c) - k2 * (h + c - 2 * t) + (c - t)
				if le < rg:
					print(2 * k1 - 1)
				else:
					print(2 * k2 - 1)
		T -= 1
solve()


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(h, c, t) = map(int, input().split())
	if t * 2 <= h + c:
		print(2)
		continue
	f = lambda x: x * h + (x - 1) * c
	ok = 1
	ng = 10 ** 6
	while abs(ok - ng) > 1:
		mid = (ok + ng) // 2
		if f(mid) >= t * (mid * 2 - 1):
			ok = mid
		else:
			ng = mid
	if abs(t * (ok * 2 - 1) - f(ok)) * (2 * ok + 1) <= abs(t * (ok * 2 + 1) - f(ok + 1)) * (2 * ok - 1):
		print(ok * 2 - 1)
	else:
		print(ok * 2 + 1)


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return [int(i) for i in input().split()]

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)
arr = []
for _ in range(ii()):
	(h, c, t) = mi()
	if t - (h + c) / 2 <= 0:
		arr.append(2)
	else:
		k = int((h - t) / (2 * t - h - c))
		if abs(k * (h + c) + h - t * (2 * k + 1)) * (2 * k + 3) <= abs((k + 1) * (h + c) + h - t * (2 * k + 3)) * (2 * k + 1):
			arr.append(2 * k + 1)
		else:
			arr.append(2 * k + 3)
print(*arr, sep='\n')


from collections import deque
import sys

def input():
	return sys.stdin.readline().rstrip()
for _ in range(int(input())):
	(h, c, t) = list(map(int, input().split()))
	if 2 * t == c + h:
		print(2)
		continue
	base = abs(h - c) // abs(2 * t - c - h)
	ans = 0
	d = 2e+18
	for i in range(base - 11, base + 10):
		if i < 1:
			continue
		if i % 2 == 1 and abs((2 * t - c - h) * i + c - h) * ans < d * i:
			d = abs((2 * t - c - h) * i + c - h)
			ans = i
	if ans * abs(2 * t - c - h) <= abs(2 * t * ans - (c + h) * (ans - 1) - 2 * h):
		ans = 2
	print(ans)


def check(h, c, t, n):
	return (n + 1) * h + n * c >= (2 * n + 1) * t

def binsearch(h, c, t):
	left = 0
	right = 1000000000
	while right - left > 1:
		mid = (right + left) // 2
		if check(h, c, t, mid):
			left = mid
		else:
			right = mid
	if check(h, c, t, right):
		return right
	else:
		return left
T = int(input())
for z in range(0, T):
	(h, c, t) = [int(i) for i in input().split(' ')]
	if 2 * t <= h + c:
		print(2)
	else:
		n = binsearch(h, c, t)
		if (2 * n + 3) * ((n + 1) * h + n * c - (2 * n + 1) * t) <= (2 * n + 1) * (-(n + 2) * h - (n + 1) * c + (2 * n + 3) * t):
			print(2 * n + 1)
		else:
			print(2 * n + 3)


from fractions import Fraction
for _ in range(int(input())):
	(hot, cold, temp) = map(int, input().split())
	if temp >= hot:
		print(1)
		continue
	if temp * 2 <= hot + cold:
		print(2)
		continue
	x = int(1 / ((temp - Fraction(hot + cold) / 2) / (hot - cold)) / 2)
	if x < 1:
		x = 1
	if x % 2 == 0:
		x -= 1
	print(min((x, x + 2), key=lambda x: abs(Fraction(hot + cold) / 2 + Fraction(hot - cold) / (2 * x) - temp)))


for i in range(int(input())):
	(a, b, c) = map(int, input().split())
	d = a - c
	e = c - b
	f = e - d
	if d >= e:
		print(2)
	elif d == 0:
		print(1)
	elif 2 <= e / d:
		if c * 3 - (2 * a + b) >= (a - c) * 3:
			print(1)
		else:
			print(3)
	else:
		g = round((d + e) / (2 * (e - d)))
		x1 = abs((g * b + (g + 1) * a) * (2 * g - 1) - (2 * g - 1) * (2 * g + 1) * c)
		x2 = abs(((g - 1) * b + g * a) * (2 * g + 1) - (2 * g - 1) * (2 * g + 1) * c)
		if x2 <= x1:
			print(2 * g - 1)
		else:
			print(2 * g + 1)


from math import inf
t = int(input())
for _ in range(t):
	(h, c, t) = map(int, input().split())
	min1 = abs(t - h)
	min2 = abs(t - (h + c) / 2)
	min3 = inf
	if t < (h + c) / 2:
		print(2)
	elif 2 * t == h + c:
		print(2)
	elif t == h:
		print(1)
	else:
		a1 = int((t - c) / (2 * t - h - c))
		a2 = a1 + 1
		if abs((h * a2 + c * (a2 - 1) - t * (2 * a2 - 1)) * (2 * a1 - 1)) >= abs(h * a1 + c * (a1 - 1) - t * (2 * a1 - 1)) * abs(2 * a2 - 1):
			a0 = a1
			min3 = abs((h * a1 + c * (a1 - 1) - t * (2 * a1 - 1)) / (2 * a1 - 1))
		else:
			a0 = a2
			min3 = abs((h * a2 + c * (a2 - 1) - t * (2 * a2 - 1)) / (2 * a2 - 1))
		if min1 == min(min1, min2, min3):
			print(1)
		elif min2 == min(min1, min2, min3):
			print(2)
		else:
			print(2 * a0 - 1)


from fractions import Fraction
q = int(input())
for _ in range(q):
	(h, c, t) = map(int, input().split())
	if 2 * t <= h + c:
		print(2)
	else:
		x1 = (c - t) // (h + c - 2 * t)
		x2 = x1 + 1
		if abs(t - Fraction(x1 * h + (x1 - 1) * c, 2 * x1 - 1)) <= abs(t - Fraction(x2 * h + (x2 - 1) * c, 2 * x2 - 1)):
			print(2 * x1 - 1)
		else:
			print(2 * x2 - 1)


def calc(a, b, t, k):
	(num1, num2) = (abs(k * (a + b) + a - (2 * k + 1) * t), abs((k + 1) * (a + b) + a - (2 * k + 3) * t))
	(den1, den2) = (2 * k + 1, 2 * k + 3)
	if num1 * den2 <= num2 * den1:
		return 2 * k + 1
	return 2 * k + 3
t = int(input())
for _ in range(t):
	(a, b, t) = map(int, input().split())
	if t <= (a + b) / 2:
		print(2)
		continue
	k = (a - t) // (2 * t - a - b)
	print(calc(a, b, t, k))


from sys import stdin, stdout
from decimal import Decimal
cin = stdin.readline
cout = stdout.write
for _ in range(int(cin())):
	(h, c, t) = map(int, cin().split())
	if (h + c) / 2 >= t:
		cout('2\n')
		continue
	i = (c - t) // (h + c - t - t)
	if abs(t - Decimal(h * i + c * (i - 1)) / Decimal(i + i - 1)) <= abs(t - Decimal(h * (i + 1) + c * i) / Decimal(i + i + 1)):
		cout(str(i + i - 1) + '\n')
	else:
		cout(str(i + i + 1) + '\n')


try:
	for _ in range(int(input())):
		(h, c, t) = map(int, input().split())
		if h <= t:
			print(1)
		elif h + c >= 2 * t:
			print(2)
		else:
			x = int((c - t) / (h + c - 2 * t))
			m = abs((x * (h + c - 2 * t) + t - c) / (2 * x - 1))
			n = abs(((x + 1) * (h + c - 2 * t) + t - c) / (2 * (x + 1) - 1))
			if m <= n:
				print(2 * x - 1)
			else:
				print(2 * x + 1)
except:
	pass


import sys
from collections import defaultdict
from copy import copy
from fractions import Fraction as FR
R = lambda t=int: t(input())
RL = lambda t=int: [t(x) for x in input().split()]
RLL = lambda n, t=int: [RL(t) for _ in range(n)]

def solve():
	(h, c, t) = RL()
	P = [(FR(abs(h - t)), 1), (abs(FR(h + c, 2) - t), 2)]
	F = lambda x: (abs(FR(h * (x + 1) + x * c, 2 * x + 1) - t), 2 * x + 1)
	if 2 * t - h - c != 0:
		x = (h - t) // (2 * t - h - c)
		for i in range(x, x + 2):
			if i >= 0:
				P += [F(i)]
	print(min(P)[1])
T = R()
for t in range(1, T + 1):
	solve()


from fractions import Fraction as F

def solve():
	(h, c, t) = map(int, input().split())
	dt = abs(F(h - t))
	ans = 1

	def update(u, v):
		nonlocal dt, ans
		if u <= 0 or v < 0:
			return
		w = F(u * h + v * c, u + v)
		if abs(w - t) < dt:
			dt = abs(w - t)
			ans = u + v
	update(1, 1)
	ax = (h - t) // (2 * t - h - c) if 2 * t - h - c else 0
	for x in range(ax - 3, ax + 4):
		update(x + 1, x)
	print(ans)
t = int(input())
for _ in range(t):
	solve()


import math
T = int(input())
for test in range(T):
	(h, c, t) = map(int, input().split())
	if h + c - 2 * t >= 0:
		print(2)
	elif h <= t:
		print(1)
	else:
		x = int((h - t) / (2 * t - h - c))
		xp1 = x + 1
		if abs((h + c) * x + h - 2 * x * t - t) * (2 * xp1 + 1) <= abs((h + c) * xp1 + h - 2 * xp1 * t - t) * (2 * x + 1):
			print(2 * x + 1)
		else:
			print(2 * xp1 + 1)


import sys
from math import inf
input = sys.stdin.buffer.readline

def prog():
	for _ in range(int(input())):
		(h, c, t) = map(int, input().split())
		lowest = (h + c) / 2
		if t <= lowest:
			print(2)
		elif abs(t - (2 * h + c) / 3) >= abs(t - h):
			print(1)
		else:
			closest = (h - c) // (t - lowest)
			closest -= closest % 2
			if closest % 4 == 0:
				closest -= 2
			closest = int(closest)
			first = lowest - t + (h - c) / closest
			second = abs(t - lowest - (h - c) / (closest + 4))
			if first <= second:
				print(closest // 2)
			else:
				print(closest // 2 + 2)
prog()


T = int(input())
for _ in range(T):
	(h, c, t) = map(int, input().split())
	if h + c >= 2 * t:
		print(2)
	else:
		x = (h - t) // (2 * t - c - h)
		y = x + 1
		if abs(h * (x + 1) + c * x - t * (2 * x + 1)) * (2 * y + 1) <= abs(h * (y + 1) + c * y - t * (2 * y + 1)) * (2 * x + 1):
			print(2 * x + 1)
		else:
			print(2 * y + 1)


from math import floor

def f(r, x, y, z):
	temp = ((r + 1) * x + r * y) / (2 * r + 1)
	return abs(temp - z)
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	av = (h + c) / 2
	if av >= t:
		print(2)
		continue
	k = floor((h - t) / (2 * t - (h + c)) + 0.5)
	temp = abs(((k + 1) * h + k * c) / (2 * k + 1) - t)
	temp1 = abs(((k + 2) * h + (k + 1) * c) / (2 * k + 3) - t)
	if temp <= temp1:
		print(2 * k + 1)
	else:
		print(2 * k + 3)


import sys
from math import sqrt, ceil, factorial, inf
from collections import defaultdict as dd, deque, Counter as C
from decimal import Decimal
mod = pow(10, 9) + 7
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def l():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
m = 10 ** 7
for _ in range(int(data())):
	(h, c, t) = sp()
	if h == t:
		out(1)
		continue
	if (h + c) / 2 >= t:
		out(2)
		continue
	(low, high) = (1, m)
	r = False
	answer = 0
	while low <= high:
		mid = (low + high) // 2
		temp: float = (mid * h + (mid - 1) * c) / (2 * mid - 1)
		if temp == t:
			out(2 * mid - 1)
			r = True
			break
		if temp >= t:
			low = mid + 1
			answer = mid
			continue
		high = mid - 1
	if not r:
		arr = [answer - 3, answer - 2, answer - 1, answer, answer + 1, answer + 2, answer + 3]
		diff = inf
		answer = 2 * answer - 1
		for i in arr:
			if i <= 0:
				continue
			temp: float = Decimal(i * h + (i - 1) * c) / Decimal(2 * i - 1)
			if temp > t:
				minus = Decimal(temp - t)
			else:
				minus = Decimal(t - temp)
			if minus < diff:
				answer = 2 * i - 1
				diff = minus
		out(answer)


from fractions import Fraction
from math import ceil, floor
for _ in range(int(input())):
	(h, c, t) = list(map(int, input().split()))
	if t * 2 <= h + c:
		print(2)
	else:
		c1 = t - Fraction(h + c, 2)
		c2 = Fraction(h - c, 2)
		goal = c2 / c1
		goal1 = (goal + 1) / 2
		ans1 = floor(goal1) * 2 - 1
		ans2 = ceil(goal1) * 2 - 1
		if c2 / ans1 + c2 / ans2 <= c1 * 2:
			print(ans1)
		else:
			print(ans2)


from math import *

def solve(h, c, t):
	if t * 2 <= h + c:
		return 2
	ans = 1
	x = (c - t) // (h + c - 2 * t)

	def den(x):
		return abs((2 * x - 1) * t - x * h - (x - 1) * c)

	def num(x):
		return 2 * x - 1
	for i in range(x - 5, x + 5):
		if i <= 0:
			continue
		if den(i) * num(ans) < den(ans) * num(i):
			ans = i
	return 2 * ans - 1

def main():
	t = int(input())
	for _ in range(t):
		print(solve(*map(int, input().split())))
main()


import sys
import math
import collections

def set_debug(debug_mode=False):
	if debug_mode:
		fin = open('input.txt', 'r')
		sys.stdin = fin

def bs(m):
	return -t * (2 * m - 1) + (m * h + (m - 1) * c)
t = int(input())
for ti in range(1, t + 1):
	(h, c, t) = list(map(int, input().split()))
	if t >= h:
		print(1)
	elif t <= (h + c) / 2:
		print(2)
	else:
		(l, r) = (2, 10 ** 12)
		find = False
		while l < r:
			m = (l + r) // 2
			b = bs(m)
			if b > 0:
				l = m + 1
			elif b < 0:
				r = m
			elif b == 0:
				print(2 * m - 1)
				find = True
				break
		if find:
			continue
		a1 = bs(l) / (2 * l - 1)
		a2 = bs(l - 1) / (2 * l - 3)
		if abs(a2) <= abs(a1):
			print((l - 1) * 2 - 1)
		else:
			print(l * 2 - 1)


import sys
from functools import cmp_to_key
input = sys.stdin.readline

def main():
	tc = int(input())

	def cmp(a, b):
		dif = a[0] * b[1] - a[1] * b[0]
		return dif if dif != 0 else a[1] - b[1]
	cmp = cmp_to_key(cmp)
	ans = []
	for _ in range(tc):
		(h, c, t) = map(int, input().split())
		if h + c == 2 * t:
			ans.append(2)
		else:
			x = max(0, (t - h) // (h + c - 2 * t))
			cands = [(h + c - 2 * t, 2), (x * (h + c) + h - (2 * x + 1) * t, 2 * x + 1), ((x + 1) * (h + c) + h - (2 * x + 3) * t, 2 * x + 3)]
			cands = map(lambda t: (abs(t[0]), t[1]), cands)
			ans.append(min(cands, key=cmp)[1])
	print('\n'.join(map(str, ans)))
main()


from math import *
T = int(input())
for T in range(1, T + 1):
	(h, c, t) = input().split()
	h = int(h)
	c = int(c)
	t = int(t)
	if t <= (h + c) / 2:
		ans = 2
	elif t >= h:
		ans = 1
	else:
		k = (t - c) // (2 * t - (h + c))
		if (t - c) % (2 * t - (h + c)) == 0:
			ans = 2 * k - 1
		elif ((k * h + (k - 1) * c) / 1 - t * (2 * k - 1)) * (2 * k + 1) <= (2 * k - 1) * (t * (2 * k + 1) - ((k + 1) * h + k * c) / 1):
			ans = 2 * k - 1
		else:
			ans = 2 * k + 1
	print(ans)


import math
from decimal import *
t = int(input())
for test in range(t):
	(h, c, t) = map(int, input().split())
	eavg = (h + c) / 2
	if t <= eavg:
		print(2)
		continue
	avg = (h - t) / (2 * t - h - c)
	a1 = max(0, math.ceil(avg))
	a2 = max(0, math.floor(avg))
	t1 = Decimal((a1 + 1) * h + a1 * c) / (2 * a1 + 1)
	t2 = Decimal((a2 + 1) * h + a2 * c) / (2 * a2 + 1)
	ans = 0
	if abs(t - t2) <= abs(t - t1):
		ans = a2
	else:
		ans = a1
	print(int(2 * ans + 1))


n = int(input())
while n > 0:
	n -= 1
	(h, c, t) = map(int, input().split())
	if t >= h:
		print(1)
	elif t <= (h + c) / 2:
		print(2)
	else:
		k = int((t - h) / (h - 2 * t + c))
		t1 = abs((h + c) * k + h - t * (2 * k + 1)) * (2 * k + 3)
		t2 = abs((h + c) * (k + 1) + h - t * (2 * k + 3)) * (2 * k + 1)
		if t1 <= t2:
			print(k * 2 + 1)
		else:
			print(k * 2 + 3)


from math import floor
t = int(input())

def near(i, h, c):
	return abs(((i + 1.0) * h + i * c) / (2 * i + 1.0))
for _ in range(t):
	(h, c, t) = (int(x) for x in input().split())
	h = h - t
	c = c - t
	if h == 0 or h == c:
		print(1)
	elif h + c >= 0:
		print(2)
	else:
		cand = -(h * 1.0) / (h + c)
		i1 = floor(cand)
		i2 = i1 + 1
		if near(i1, h, c) <= near(i2, h, c):
			print(2 * i1 + 1)
		else:
			print(2 * i2 + 1)


tests = int(input())
for _ in range(tests):
	(h, c, t) = map(int, input().split())
	if t == h:
		print(1)
		continue
	if t <= (h + c) / 2:
		print(2)
		continue
	target = t - (h + c) / 2
	dif = h - c
	tmp = int(dif // (2 * target))
	if tmp <= 0:
		tmp = 1
	if tmp % 2 == 0:
		tmp = tmp - 1
	val = 500000000
	ans = 0
	if abs(target - dif / (2 * tmp)) < val:
		val = abs(target - dif / (2 * tmp))
		ans = tmp
	if abs(target - dif / (2 * (tmp + 2))) < val:
		val = abs(target - dif / (2 * (tmp + 2)))
		ans = tmp + 2
	if abs(target - dif / (2 * (tmp + 4))) < val:
		ans = tmp + 4
	print(ans)


def solve():
	[hi, lo, barrel] = map(int, input().split())
	if 2 * barrel <= hi + lo:
		return 2
	items = (hi - barrel) // (2 * barrel - hi - lo)
	temp = lambda t: ((t + 1) * hi + t * lo - (2 * t + 1) * barrel) / (2 * t + 1)
	if abs(temp(items)) > abs(temp(items + 1)):
		items += 1
	return 2 * items + 1
for _ in range(int(input())):
	print(solve())


from math import floor, ceil
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if t > (h + c) / 2:
		k1 = floor((t - h) / (h + c - 2 * t))
		k2 = ceil((t - h) / (h + c - 2 * t))
		if abs(t * (2 * k1 + 1) * (2 * k2 + 1) - ((k1 + 1) * h + k1 * c) * (2 * k2 + 1)) > abs(t * (2 * k1 + 1) * (2 * k2 + 1) - ((k2 + 1) * h + k2 * c) * (2 * k1 + 1)):
			print(2 * k2 + 1)
		else:
			print(2 * k1 + 1)
	else:
		print(2)


from sys import stdin, stdout
input = stdin.readline

def print(x):
	stdout.write(str(x) + '\n')

def solve():
	(h, c, t) = map(int, input().split())
	if t <= (h + c) / 2:
		print(2)
	else:
		k = (h - t) // (2 * t - h - c)
		k = 2 * k + 1
		c1 = (k // 2 + 1) * h + k // 2 * c - t * k
		c2 = ((k + 2) // 2 + 1) * h + (k + 2) // 2 * c - t * (k + 2)
		if abs(c1) * (k + 2) <= abs(c2) * k:
			print(k)
		else:
			print(k + 2)
t = 1
t = int(input())
for _ in range(t):
	solve()


temp = int(input())
while temp > 0:
	temp -= 1
	(h, c, t) = map(int, input().split())
	if 2 * t <= h + c:
		print(2)
		continue
	w = (h - t) // (2 * t - h - c)
	if abs((2 * w + 3) * t - w * h - 2 * h - w * c - c) * (2 * w + 1) < abs((2 * w + 1) * t - w * h - h - w * c) * (2 * w + 3):
		print(2 * w + 3)
	else:
		print(2 * w + 1)


def f(h, c, t, x):
	n = x * 2 + 1
	return abs(h * (x + 1) + c * x - t * n)
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if h + c >= t * 2:
		print(2)
		continue
	if h <= t:
		print(1)
		continue
	ans1 = (h - t) // (2 * t - h - c)
	ans2 = ans1 + 1
	if f(h, c, t, ans1) * (2 * ans2 + 1) <= f(h, c, t, ans2) * (2 * ans1 + 1):
		print(ans1 * 2 + 1)
	else:
		print(ans2 * 2 + 1)


import math
from decimal import *

def more_precise(t, C, h, r):
	return abs(Decimal(t - C) - Decimal((h - C) / r))

def get_closer(t, C, h, r1, r2):
	d1 = abs(t - (C + (h - C) / r1))
	d2 = abs(t - (C + (h - C) / r2))
	if d1 == d2:
		d1 = more_precise(t, C, h, r1)
		d2 = more_precise(t, C, h, r2)
	if d1 <= d2:
		return r1
	else:
		return r2

def main():
	T = int(input())
	for _ in range(T):
		(h, c, t) = map(int, input().split())
		C = (h + c) / 2
		if C >= t:
			print(2)
			continue
		elif h <= t:
			print(1)
			continue
		r = (h - C) / (t - C)
		(ceil, floor) = (math.ceil(r), math.floor(r))
		if ceil % 2 == 0:
			ceil += 1
		if floor % 2 == 0:
			floor -= 1
		print(get_closer(t, C, h, floor, ceil))
main()


import sys
import heapq

def gcd(a, b):
	if a < b:
		(a, b) = (b, a)
	if b == 0:
		return a
	return gcd(b, a % b)

def main():
	a = int(input())
	for _ in range(a):
		(h, c, t) = map(int, sys.stdin.readline().split())
		if t >= h:
			print(1)
			continue
		if t <= (h + c) / 2:
			print(2)
			continue
		n = 0
		while (n * (c + h) + h) / (2 * n + 1) > t:
			temp = 0
			cnt = 1
			while ((n + 2 * cnt) * (c + h) + h) / (2 * (n + 2 * cnt) + 1) > t:
				cnt *= 2
				temp += 1
			n += cnt
		tempH = int(abs(n * (c + h) + h - t * (2 * n + 1)))
		tempL = 2 * n + 1
		bigVal = tempH // gcd(tempH, tempL) / (tempL // gcd(tempH, tempL))
		tempH = int(abs((n - 1) * (c + h) + h - t * (2 * n - 1)))
		tempL = 2 * n - 1
		lowVal = tempH // gcd(tempH, tempL) / (tempL // gcd(tempH, tempL))
		if bigVal >= lowVal:
			print(2 * n - 1)
		else:
			print(2 * n + 1)
	return
main()


from fractions import Fraction
T = int(input())

def TMP(h, c, nbH):
	return c + Fraction(nbH, 2 * nbH - 1) * (h - c)
for _ in range(T):
	(h, c, t) = [int(_) for _ in input().split()]
	if t <= (h + c) // 2:
		print(2)
		continue
	(L, R) = (1, 10 ** 9)
	a = 0
	while L <= R:
		m = (L + R) // 2
		tmp = TMP(h, c, m)
		if tmp >= t:
			L = m + 1
			a = m
		else:
			R = m - 1
	b = a + 1
	if abs(TMP(h, c, a) - t) <= abs(TMP(h, c, b) - t):
		print(a * 2 - 1)
	else:
		print(b * 2 - 1)


eps = 1e-10
t = int(input())
for _ in range(t):
	(h, c, t) = map(int, input().split())
	l = 0
	r = 100000000
	while l + 1 < r:
		mid = (l + r) // 2
		if mid % 2 == 0:
			if mid + 1 < r:
				mid += 1
			elif mid - 1 > l:
				mid -= 1
			else:
				break
		p = (mid // 2 + 1) * h + mid // 2 * c
		if p / mid - t > -eps:
			l = mid
		else:
			r = mid
	r = l + 2
	for_2 = abs(((h + c) / 2 - t) * l * r)
	for_l = abs(((l // 2 + 1) * h + l // 2 * c) * r - t * l * r)
	for_r = abs(((r // 2 + 1) * h + r // 2 * c) * l - t * l * r)
	m = min(for_2, min(for_l, for_r))
	if abs(m - for_2) < eps:
		print(2)
	elif abs(m - for_l) < eps:
		print(l)
	else:
		print(r)


cases = int(input())
for _ in range(cases):
	(hot, cold, target) = map(int, input().split())
	if 2 * target <= hot + cold:
		print(2)
	elif target >= hot:
		print(1)
	else:
		(lo, hi) = (1, 10 ** 20)
		while lo < hi:
			mid = (lo + 1 + hi) // 2
			if mid * hot + (mid - 1) * cold >= (2 * mid - 1) * target:
				lo = mid
			else:
				hi = mid - 1
		upper_bound = (lo * hot + (lo - 1) * cold, lo + lo - 1)
		hi = lo + 1
		lower_bound = (hi * hot + (hi - 1) * cold, hi + hi - 1)
		ans = lo
		if abs((upper_bound[0] - upper_bound[1] * target) * lower_bound[1]) > abs((lower_bound[0] - lower_bound[1] * target) * upper_bound[1]):
			ans = hi
		print(2 * ans - 1)


from sys import stdin, gettrace
from fractions import Fraction
if not gettrace():

	def input():
		return next(stdin)[:-1]

def main():

	def solve():
		(h, c, t) = map(int, input().split())
		if t <= (h + c) / 2:
			print(2)
			return
		if t >= h:
			print(1)
			return
		m = (h - t) // (2 * t - h - c)
		t1 = Fraction((m + 1) * h + m * c, 2 * m + 1)
		t2 = Fraction((m + 2) * h + (m + 1) * c, 2 * m + 3)
		if abs(t1 - t) <= abs(t2 - t):
			print(2 * m + 1)
		else:
			print(2 * m + 3)
	q = int(input())
	for _ in range(q):
		solve()
main()


for _ in range(int(input())):
	(h, c, t) = list(map(int, input().split()))
	av = (h + c) / 2
	if t >= h:
		print(1)
		continue
	elif t <= av:
		print(2)
		continue
	x = (h - t) // (2 * t - (h + c))
	t1 = (x + 1) * h + x * c
	t2 = (x + 2) * h + (x + 1) * c
	if abs(t * (2 * x + 1) - t1) * (2 * x + 3) <= abs(t * (2 * x + 3) - t2) * (2 * x + 1):
		print(x * 2 + 1)
	else:
		print(2 * x + 3)


import sys
input = sys.stdin.readline
from fractions import *

def go(mid, h, c):
	return Fraction(h * mid + c * (mid - 1), mid + mid - 1)
MAX_HI = 3010101

def solve_case(input_text):
	(h, c, t) = map(int, input_text.rstrip().split())
	if Fraction(h + c, 2) >= t:
		return 2
	(lo, hi) = (1, MAX_HI)
	while lo + 1 != hi:
		mid = (lo + hi) // 2
		if t <= go(mid, h, c):
			lo = mid
		else:
			hi = mid
	ans = lo
	anst = abs(t - go(lo, h, c))
	for i in range(max(lo - 3, 1), lo + 3):
		tmp = abs(t - go(i, h, c))
		if tmp < anst:
			ans = i
			anst = tmp
	return ans * 2 - 1
tc = int(input())
for tci in range(tc):
	print(solve_case(input()))


for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	n = 0
	ct = 0
	if h == t:
		print(1)
	elif t <= (h + c) // 2:
		print(2)
	else:
		t -= (h + c) / 2
		t1 = (h - c) / 2 / t
		x1 = int((t1 - 1) // 2 * 2 + 1)
		x2 = int((t1 + 1) // 2 * 2 + 1)
		if (h - c) / (x1 * 2) - t <= t - (h - c) / (x2 * 2):
			print(x1)
		else:
			print(x2)


t = int(input())
for i in range(t):
	a = []
	a = list(map(int, input().split()))
	h = a[0]
	c = a[1]
	t = a[2]
	ans = 0
	m = 2
	ans = float(h)
	ch = ans
	if h <= t:
		print(1)
	elif (h + c) / 2 >= t:
		print(2)
	else:
		while 0 == 0:
			m += 2
			ch = ans
			ans = ((h + c) * (m // 2) - c) / (m - 1)
			if abs(ch - t) <= abs(ans - t):
				print(m - 3)
				break
			if m > 10:
				m = (1 - c / t) / (1 - (h + c) / 2 / t)
				m = int(m)
				if m % 2 == 0:
					m += 1
				ans1 = ((h + c) * (m // 2) + h) / m
				ans2 = ((h + c) * (m // 2 - 1) + h) / (m - 2)
				ans3 = ((h + c) * (m // 2 + 1) + h) / (m + 2)
				ans1 = abs(t - ans1)
				ans2 = abs(t - ans2)
				ans3 = abs(t - ans3)
				if ans1 <= ans2 and ans1 <= ans3:
					print(m)
				elif ans2 <= ans3 and ans2 <= ans1:
					print(m - 2)
				else:
					print(m + 2)
				break


import sys
from decimal import *
input = sys.stdin.buffer.readline

def temp(nHot, h, c):
	return (nHot * h + (nHot - 1) * c) / (2 * nHot - 1)

def tempDec(nHot, h, c):
	return Decimal(nHot * h + (nHot - 1) * c) / (2 * nHot - 1)
nTests = int(input())
for _ in range(nTests):
	(h, c, t) = [int(zz) for zz in input().split()]
	if t <= (h + c) / 2:
		print(2)
	elif t == h:
		print(1)
	else:
		lo = 1
		hi = int(h / 2 - c / 4 + 0.5) + 1
		while True:
			nHot = (lo + hi) // 2
			if temp(nHot, h, c) > t and temp(nHot + 1, h, c) <= t:
				break
			elif temp(nHot, h, c) > t:
				lo = nHot + 1
			else:
				hi = nHot - 1
		if abs(temp(nHot, h, c) - t) < abs(temp(nHot + 1, h, c) - t):
			print(nHot * 2 - 1)
		elif abs(temp(nHot, h, c) - t) > abs(temp(nHot + 1, h, c) - t):
			print(nHot * 2 + 1)
		else:
			(a, b) = (abs(tempDec(nHot, h, c) - t), abs(tempDec(nHot + 1, h, c) - t))
			if a <= b:
				print(nHot * 2 - 1)
			else:
				print(nHot * 2 + 1)


import sys
from decimal import *
input = sys.stdin.buffer.readline

def tempDec(nHot, h, c):
	return Decimal(nHot * h + (nHot - 1) * c) / (2 * nHot - 1)
nTests = int(input())
for _ in range(nTests):
	(h, c, t) = [int(zz) for zz in input().split()]
	if t <= (h + c) / 2:
		print(2)
	elif t == h:
		print(1)
	else:
		nHot = (t - c) // (2 * t - h - c)
		(a, b) = (abs(tempDec(nHot, h, c) - t), abs(tempDec(nHot + 1, h, c) - t))
		if b < a:
			print((nHot + 1) * 2 - 1)
		else:
			print(nHot * 2 - 1)


from sys import stdin, stdout
from decimal import *
cin = stdin.readline
cout = stdout.write
for _ in range(int(cin())):
	(h, c, t) = map(int, cin().split())
	if max((h + c) / 2, t) - min((h + c) / 2, t) <= 1e-06:
		cout('2\n')
		continue
	i = (c - t) // (h + c - t - t)
	if i <= 0:
		cout('2\n')
		continue
	diff = Decimal(max(h, t) - min(h, t) + 1)
	i = max(1, i)
	while True:
		temp = Decimal(h * i + c * (i - 1)) / Decimal(i + i - 1)
		if Decimal(max(temp, t) - min(temp, t)) < diff:
			i += 1
			diff = Decimal(max(temp, t) - min(temp, t))
		else:
			cout(str(i + i - 1 - 2) + '\n')
			break


from decimal import *
getcontext().prec = 30
T = int(input())
o = []
for i in range(T):
	(h, c, t) = input().split()
	h = int(h)
	c = int(c)
	t = int(t)
	s = (h + c) / 2
	if t >= h:
		o.append(1)
	elif t <= s:
		o.append(2)
	else:
		i = (h - t) / (2 * t - (h + c))
		if i == int(i):
			i = int(i)
			o.append(2 * i + 1)
		else:
			i = Decimal(int(i))
			h = Decimal(h)
			c = Decimal(c)
			t = Decimal(t)
			prev = ((i + 1) * h + i * c) / (2 * i + 1)
			i += 1
			cur = ((i + 1) * h + i * c) / (2 * i + 1)
			if abs(cur - t) >= abs(prev - t):
				o.append((i - 1) * 2 + 1)
			else:
				o.append(i * 2 + 1)
for i in range(T):
	print(o[i])


import sys
from collections import defaultdict
import math
input = sys.stdin.readline

def print_result(l):
	return print(' '.join(map(str, l)))

def timer(function):
	import time

	def wrapper(*args, **kwargs):
		t1 = time.time()
		val = function()
		t2 = time.time()
		print('Executed \\{}\\ in {:.2f} seconds.'.format(function.__name__, t2 - t1))
		return val
	return wrapper

def string_to_arr(s):
	return [x for x in s]

def solve():
	(h, c, t) = map(int, input().split(' '))
	if 2 * t <= h + c:
		return '2'
	x = int((t - h) / (h + c - 2 * t))
	(a, b) = (x, x + 1)
	tt = t * (2 * a + 1) * (2 * b + 1)
	aa = abs(tt - (a * (c + h) + h) * (2 * b + 1))
	bb = abs(tt - (b * (c + h) + h) * (2 * a + 1))
	if aa <= bb:
		return str(2 * a + 1)
	return str(2 * b + 1)
t = int(input())
l = []
for _ in range(t):
	l.append(solve())
print('\n'.join(l))


from fractions import Fraction

def temp(hot, cold, step):
	return Fraction(hot * step + cold * (step - 1), 2 * step - 1)
tests = int(input())
for i in range(tests):
	numbers = input().split(' ')
	h = int(numbers[0])
	c = int(numbers[1])
	t = int(numbers[2])
	if t >= h:
		print(1)
	elif t <= (h + c) / 2:
		print(2)
	else:
		step0 = ((h - c) / (t - (h + c) / 2) + 2) / 4
		step = int(((h - c) / (t - (h + c) / 2) + 2) / 4)
		t_0 = temp(h, c, step)
		t_1 = temp(h, c, step + 1)
		if abs(t_0 - t) <= abs(t_1 - t):
			print(step * 2 - 1)
		else:
			print((step + 1) * 2 - 1)


T = int(input())
for iteration in range(T):
	[h, c, t] = list(map(int, input().split()))
	if t <= (h + c) / 2:
		print(2)
	else:
		k = 1 / 2 * (h - c) / (2 * t - h - c)
		k = k + 1 / (4 * (int(k) + 1))
		if k - int(k) <= 10 ** (-8):
			k = int(k) - 1
		else:
			k = int(k)
		print(2 * k + 1)


import sys
from fractions import Fraction
readline = sys.stdin.readline
readlines = sys.stdin.readlines
ns = lambda : readline().rstrip()
ni = lambda : int(readline().rstrip())
nm = lambda : map(int, readline().split())
nl = lambda : list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

def calc(x, t, h, c):
	return abs(Fraction(t) - Fraction(x * h + (x - 1) * c) / Fraction(x * 2 - 1))

def solve():
	(h, c, t) = nm()
	if t * 2 <= h + c:
		print(2)
		return
	x = (t - c) // (2 * t - h - c)
	cmax = abs(Fraction(t) - Fraction(h + c) / Fraction(2))
	cidx = -1
	for i in range(x + 3, max(x - 4, 0), -1):
		if cmax >= calc(i, t, h, c):
			cmax = calc(i, t, h, c)
			cidx = i
	print(cidx * 2 - 1 if cidx >= 0 else 2)
	return
T = ni()
for _ in range(T):
	solve()


def f(h, c, t):
	if t <= (c + h) / 2:
		return 2
	if t >= h:
		return 1
	x = (t - c) // (2 * t - h - c)
	if (4 * x * x + 2 * x - 1) * h + (4 * x * x - 2 * x - 1) * c <= 2 * (4 * x * x - 1) * t:
		return 2 * x - 1
	else:
		return 2 * x + 1
t = int(input())
for i in range(t):
	[h, c, t] = input().split(' ')
	print(f(int(h), int(c), int(t)))


import sys

def input():
	return sys.stdin.readline().rstrip()
testcases = int(input())
answers = []

def loss(two_n_plus_one, hot, cold, desired):
	n = two_n_plus_one // 2
	return abs((desired * (2 * n + 1) - ((n + 1) * hot + n * cold)) / (2 * n + 1))
for _ in range(testcases):
	(hot, cold, desired_temp) = [int(i) for i in input().split()]
	mid_way = (hot + cold) / 2
	if hot == cold:
		answers.append(1)
	elif desired_temp >= hot:
		answers.append(1)
	elif desired_temp <= mid_way:
		answers.append(2)
	else:
		frac = (hot - desired_temp) / (desired_temp - mid_way)
		frac /= 2
		option1 = 2 * int(frac) + 1
		option2 = option1 + 2
		(l1, l2) = (loss(option1, hot, cold, desired_temp), loss(option2, hot, cold, desired_temp))
		if min(l1, l2) >= hot - desired_temp and hot - desired_temp <= desired_temp - mid_way:
			answers.append(1)
		elif min(l1, l2) >= desired_temp - mid_way:
			answers.append(2)
		elif l1 <= l2:
			answers.append(option1)
		else:
			answers.append(option2)
print(*answers, sep='\n')


from fractions import Fraction
import bisect
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq as hq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def tinput():
	return input().split()

def rinput():
	return map(int, tinput())

def rlinput():
	return list(rinput())
mod = int(1000000000.0) + 7

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))
t = 1
for _ in range(iinput()):
	(h, c, t) = rinput()
	mindiff = abs(t - h)
	mincups = 1
	if abs(t - (h + c) / 2.0) < mindiff:
		mindiff = abs(t - (h + c) / 2.0)
		mincups = 2
	if 2 * t - h - c != 0:
		i = float(h - t) / float(2 * t - h - c)
		i = abs(i)
		i1 = math.ceil(i)
		i2 = math.floor(i)
		newx = t
		newx -= Fraction(h * i2 + h + c * i2, 2 * i2 + 1)
		newx = abs(newx)
		if newx < mindiff:
			mincups = 2 * i2 + 1
			mindiff = newx
		elif newx == mindiff:
			mincups = min(mincups, 2 * i2 + 1)
		newx = t
		newx -= Fraction(h * i1 + h + c * i1, 2 * i1 + 1)
		newx = abs(newx)
		if newx < mindiff:
			mincups = 2 * i1 + 1
			mindiff = newx
		elif newx == mindiff:
			mincups = min(mincups, 2 * i1 + 1)
	print(mincups)


import math
from decimal import *
t = int(input())

def tg(h, c, x):
	return Decimal(h + (h + c) * x) / Decimal(2 * x + 1)
for _ in range(t):
	(h, c, t) = map(int, input().split())
	if h == t:
		print(1)
	elif (h + c) / 2 >= t:
		print(2)
	else:
		x = math.floor(Decimal((t - h) / (h + c - 2 * t)))
		y = math.ceil(Decimal((t - h) / (h + c - 2 * t)))
		if abs(t - tg(h, c, x)) <= abs(t - tg(h, c, y)):
			print(1 + int(2 * x))
		else:
			print(1 + int(2 * y))


from decimal import Decimal
from math import floor
from sys import stdin, stdout
int_in = lambda : int(stdin.readline())
arr_in = lambda : [int(x) for x in stdin.readline().split()]
mat_in = lambda rows: [arr_in() for y in range(rows)]
str_in = lambda : stdin.readline().strip()
out = lambda o: stdout.write('{}\n'.format(o))
arr_out = lambda o: out(' '.join(map(str, o)))
bool_out = lambda o: out('YES' if o else 'NO')
tests = lambda : range(1, int_in() + 1)
case_out = lambda i, o: out('Case #{}: {}'.format(i, o))

def check(x, h, c):
	return Decimal(x * h + (x - 1) * c) / Decimal(2 * x - 1)

def solve(h, c, t):
	if h == c:
		return 1
	if 2 * t <= h + c:
		return 2
	point = (c - t) / (h + c - 2 * t)
	lower = floor(point)
	start_at = max(1, lower)
	end_at = start_at + 2
	best_i = -1
	best_diff = float('inf')
	for i in range(start_at, end_at):
		curr = abs(t - check(i, h, c))
		if curr < best_diff:
			best_diff = curr
			best_i = i
	return 2 * best_i - 1
for i in tests():
	(h, c, t) = arr_in()
	out(solve(h, c, t))


from sys import stdin
input = stdin.buffer.readline
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	d = abs((t << 1) - h - c)
	ans = 2
	(l, r) = (0, 1000000)
	while r - l > 1:
		mid = l + r >> 1
		if (h + c) * mid + h < t * (mid << 1 | 1):
			r = mid
		else:
			l = mid
	tmp = abs(t * (r << 1 | 1) - (h + c) * r - h)
	if tmp << 1 < d * (r << 1 | 1) or (tmp << 1 == d * (r << 1 | 1) and r << 1 | 1 < ans):
		d = tmp
		ans = r << 1 | 1
	tmp = abs(t * (l << 1 | 1) - (h + c) * l - h)
	if tmp * ans < d * (l << 1 | 1) or (tmp * ans == d * (l << 1 | 1) and l << 1 | 1 < ans):
		d = tmp
		ans = l << 1 | 1
	print(ans)


from fractions import Fraction as frac
import sys, os
input = sys.stdin.buffer.read().split(b'\n')[::-1].pop
from heapq import heappush, heappop

def i():
	return input()

def ii():
	return int(input())

def iis():
	return map(int, input().split())

def liis():
	return list(map(int, input().split()))

def pint(x):
	(os.write(1, str(x).ecode('ascii')), os.write(1, b'\n'))

def print_array(a):
	(os.write(1, b' '.join((str(x).encode('ascii') for x in a))), os.write(1, b'\n'))
Test = int(input())
while True:
	Test -= 1
	if Test < 0:
		break
	[h, c, t] = [int(x) for x in input().split()]
	x = h + c
	if h + c >= 2 * t:
		print(2)
		continue

	def eval(k):
		return abs(frac(k * x + h, 2 * k + 1) - t)
	k = (h - t) // (2 * t - x)
	k = max(k - 10, 0)
	ans = k
	for i in range(0, 21):
		if eval(k + i) < eval(ans):
			ans = k + i
	print(2 * ans + 1)


input = __import__('sys').stdin.readline
from decimal import Decimal
import decimal
decimal.getcontext().prec = 20

def cal1(no, h, c):
	ans = Decimal((h + c) * no + h) / Decimal(2 * no + 1)
	return ans
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	a1 = (h + c) / 2
	l = 1
	r = 1000000
	hh = 0
	if t <= (h + c) / 2:
		print(2)
		continue
	while l <= r:
		mid = l + (r - l) // 2
		tmp = ((h + c) * mid + h) / (2 * mid + 1)
		if t < tmp:
			l = mid + 1
		else:
			r = mid - 1
		hh += 1
		if hh > 300:
			break
	a3 = 1000000000000
	ind3 = -1
	for i in range(l, max(-1, l - 4), -1):
		tmp = cal1(i, h, c)
		if abs(t - tmp) <= abs(t - a3):
			a3 = tmp
			ind3 = i
	for i in range(l, l + 4, 1):
		tmp = cal1(i, h, c)
		if abs(t - tmp) < abs(t - a3):
			a3 = tmp
			ind3 = i
	print(2 * ind3 + 1)


import sys

def input():
	return sys.stdin.readline()[:-1]
from functools import lru_cache
from itertools import product
from fractions import Fraction as F

def f(h, c, m, t):
	return h * (m + 1) + c * m

def solve():
	(h, c, t) = [int(x) for x in input().split()]
	h *= 10 ** 9
	c *= 10 ** 9
	t *= 10 ** 9
	if h + c >= t * 2:
		print(2)
		return
	delta = F(abs(t - h))
	ans = 1
	l = 0
	r = 10 ** 18
	while l + 1 < r:
		m = (l + r) // 2
		if f(h, c, m, t) > t * (2 * m + 1):
			l = m
		else:
			r = m
	for l in range(l, r + 3):
		if abs(F(t) - F(f(h, c, l, t), 2 * l + 1)) < delta:
			delta = abs(F(t) - F(f(h, c, l, t), 2 * l + 1))
			ans = 2 * l + 1
	print(ans)
t = 1
t = int(input())
for case in range(1, t + 1):
	ans = solve()


import sys
input = sys.stdin.readline
T = int(input())

def solve(h, c, t, x):
	if h * x + c * (x - 1) > t * (2 * x - 1):
		return True
	else:
		return False
for _ in range(T):
	(h, c, t) = [int(x) for x in input().split()]
	left = 1
	right = 10 ** 20
	while right - left > 1:
		mid = (right + left) // 2
		if solve(h, c, t, mid):
			left = mid
		else:
			right = mid
	l = (h * left + c * (left - 1)) * (2 * right - 1) * 2
	r = (h * right + c * (right - 1)) * (2 * left - 1) * 2
	m = (h * 1 + c * 1) * (2 * left - 1) * (2 * right - 1)
	t *= 2 * (2 * left - 1) * (2 * right - 1)
	a = [abs(l - t), abs(r - t), abs(m - t)]
	if min(a) == abs(t - m):
		print(2)
	elif min(a) == abs(l - t):
		print(2 * left - 1)
	elif min(a) == abs(t - r):
		print(2 * right - 1)
	else:
		print(1)


import sys, math
input = sys.stdin.readline

def getInts():
	return [int(s) for s in input().split()]

def getInt():
	return int(input())

def getStrs():
	return [s for s in input().split()]

def getStr():
	return input().strip()

def listStr():
	return list(input().strip())
import collections as col
import math

def solve():
	(H, C, T) = getInts()
	if H in (C, T):
		return 1
	if 2 * T <= H + C:
		return 2
	if T >= H:
		return 1
	left = 1
	right = 10 ** 18 - 1
	while right - left > 2:
		middle = (right + left) // 2
		if middle % 2 == 0:
			middle -= 1
		curr_temp = (middle // 2 + 1) * H + middle // 2 * C
		if middle * T == curr_temp:
			return middle
		if middle * T < curr_temp:
			left = middle
		else:
			right = middle
	right_temp = (right // 2 + 1) * H + right // 2 * C
	left_temp = (left // 2 + 1) * H + left // 2 * C
	if abs(left * (right_temp - right * T)) < abs(right * (left_temp - left * T)):
		return right
	return left
for _ in range(getInt()):
	print(solve())


import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
import sys
from math import floor, ceil

def solve(h, c, t):
	if h == t:
		return 1
	if 2 * t <= h + c:
		return 2
	if 6 * t >= 5 * h + c:
		return 1
	if 3 * t >= 2 * h + c:
		return 3
	if (h - t) % (2 * t - (h + c)) == 0:
		cnt = (h - t) // (2 * t - (h + c))
		return 2 * cnt + 1
	(k, l) = (floor((h - t) / (2 * t - (h + c))), ceil((h - t) / (2 * t - (h + c))))
	t_k = abs((h * (k + 1) + c * k) / (2 * k + 1) - t)
	t_l = abs((h * (l + 1) + c * l) / (2 * l + 1) - t)
	if (2 * l + 1) * (h * (k + 1) + c * k) + (2 * k + 1) * (h * (l + 1) + c * l) <= 2 * t * (2 * k + 1) * (2 * l + 1):
		return 2 * k + 1
	return 2 * l + 1

def main():
	T = int(input())
	for _ in range(T):
		(h, c, t) = map(int, input().split())
		ans = solve(h, c, t)
		sys.stdout.write(str(ans) + '\n')
main()


t = int(input())
for _ in range(t):
	(h, c, t) = map(int, input().split())
	if t >= h:
		print(1)
		continue
	if (h + c) % 2 == 0 and t == (h + c) // 2:
		print(2)
		continue
	if t < (h + c) / 2:
		print(2)
		continue
	n = (t - c) // (2 * t - h - c)
	if (t - c) % (2 * t - h - c) == 0:
		print(2 * n - 1)
		continue
	n0 = n
	n1 = n + 1
	t0 = abs(t * (2 * n0 - 1) * (2 * n1 - 1) - (n0 * h + (n0 - 1) * c) * (2 * n1 - 1))
	t1 = abs(t * (2 * n0 - 1) * (2 * n1 - 1) - (n1 * h + (n1 - 1) * c) * (2 * n0 - 1))
	if t0 <= t1:
		print(2 * n0 - 1)
	else:
		print(2 * n1 - 1)


from decimal import *
T = int(input())

def ctemp(x):
	return (h * (x + 1) + c * x) / (2 * x + 1)

def ctemp2(x):
	return (h * (x + 1) + c * x) / (2 * x + 1)
for _ in range(T):
	(h, c, t) = map(int, input().split())
	now = abs((h + c) / 2 - t)
	if (h + c) / 2 >= t:
		print(2)
	else:
		l = 0
		r = h
		while r > l + 1:
			m = (r + l) // 2
			temp = ctemp(m)
			if temp > t:
				l = m
			else:
				r = m
		h = Decimal(h)
		c = Decimal(c)
		t = Decimal(t)
		temp1 = ctemp2(l)
		temp2 = ctemp(r)
		if abs(temp1 - t) <= abs(temp2 - t):
			print(2 * l + 1)
		else:
			print(2 * r + 1)


import decimal
decimal.getcontext().prec = 20

def get_r(r, n1, n2, i):
	d = abs(r - decimal.Decimal(h * (i // 2 + 1) + c * (i // 2)) / decimal.Decimal(i))
	return d
t = int(input())
for _ in range(t):
	(h, c, r) = map(int, input().rstrip().split(' '))
	if h == r:
		print(1)
	elif r <= (h + c) / 2:
		print(2)
	else:
		d = (h - r) / (2 * r - h - c)
		if d % 1:
			d = ((int(d) + 1) * 2 - 1) // 1
			t1 = get_r(r, h, c, d - 2)
			t2 = get_r(r, h, c, d)
			t3 = get_r(r, h, c, d + 2)
			if t1 == min(t1, t2, t3):
				print(int(d - 2))
			elif t2 == min(t1, t2, t3):
				print(int(d))
			elif t3 == min(t1, t2, t3):
				print(int(d + 2))
		else:
			print(int(2 * d + 1))


for case in range(int(input())):
	a = input().split(' ')
	h = int(a[0])
	c = int(a[1])
	t = int(a[2])
	avg = (h + c) / 2
	if t < avg:
		ans = 2
	elif t == avg:
		ans = 2
	elif t == h:
		ans = 1
	elif h > t > avg:
		diff = t - avg
		v = (h - avg) // diff
		if v % 2 == 0:
			v1 = (h - avg) / (v + 1)
			v2 = (h - avg) / (v - 1)
			d1 = abs(diff - v1)
			d2 = abs(diff - v2)
			if d1 >= d2:
				ans = v - 1
			else:
				ans = v + 1
		else:
			v1 = (h - avg) / (v - 2)
			v2 = (h - avg) / v
			v3 = (h - avg) / (v + 2)
			d1 = abs(diff - v1)
			d2 = abs(diff - v2)
			d3 = abs(diff - v3)
			if d1 <= d2 and d1 <= d3:
				ans = v - 2
			elif d2 <= d1 and d2 <= d3:
				ans = v
			else:
				ans = v + 2
	else:
		ans = 1
	print(int(ans))


import math
tests = int(input())
for _ in range(tests):
	(h, c, t) = map(int, input().split())
	if 2 * t <= h + c:
		print(2)
	else:
		m = (h - t) / (2 * t - h - c)
		if m == 0:
			print(1)
		else:
			m1 = math.ceil(m)
			m2 = math.floor(m)
			if abs((m2 + 1) * h + m2 * c - (2 * m2 + 1) * t) < abs((m1 + 1) * h + m1 * c - (2 * m1 + 1) * t):
				if abs(((m2 + 1) * h + m2 * c) / (2 * m2 + 1) - t) <= abs(((m1 + 1) * h + m1 * c) / (2 * m1 + 1) - t):
					print(2 * m2 + 1)
				else:
					print(2 * m1 + 1)
			else:
				print(2 * m1 + 1)


for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if h + c >= t * 2:
		print(2)
	elif h <= t:
		print(1)
	else:
		k = (h - t) // (t * 2 - h - c)
		x = k * k * 2 + k * 5
		y = k * k * 2 + k * 3
		if (x + 3 + x + 2) * h + (y + y + 1) * c > 2 * (4 * k * k + 8 * k + 3) * t:
			k += 1
		print(k * 2 + 1)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
t = int(input())
from math import ceil
from fractions import Fraction
for i in range(t):
	(h, c, t) = map(int, input().split())
	av1 = Fraction(h + c, 2)
	if av1 == t:
		print(2)
	elif av1 > t:
		print(2)
	else:
		x = int((h - t) / abs(t - av1)) + 1
		y = x + 1
		l = []
		if x % 2 != 0:
			l.append([abs((av1 * (x - 1) + h) * Fraction(1, x) - Fraction(t, 1)), x])
			l.append([abs((av1 * (x + 1) + h) * Fraction(1, x + 2) - Fraction(t, 1)), x + 2])
		if y % 2 != 0:
			l.append([abs((av1 * (y - 1) + h) * Fraction(1, y) - Fraction(t, 1)), y])
			l.append([abs((av1 * (y + 1) + h) * Fraction(1, y + 2) - Fraction(t, 1)), y + 2])
		l.append([abs(Fraction(t, 1) - av1), 2])
		l.sort()
		print(l[0][1])


def solve():
	(h, c, t) = map(int, input().split())
	if h == t:
		result = 1
	elif t <= (h + c) / 2:
		result = 2
	else:
		k = (t - c - 1) // (2 * t - h - c)
		result = 2 * k + 1
		result -= 2 if (4 * k * k - 1) * (2 * t - h - c) >= 2 * (h - c) * k else 0
	print(result)

def main():
	for _ in range(int(input())):
		solve()
main()


from math import ceil
from fractions import Fraction
t = int(input())
for iza in range(t):
	X = input()
	X1 = X.split()
	h = int(X1[0])
	c = int(X1[1])
	t = int(X1[2])
	h = h - c
	t = t - c
	c = 0
	if t <= h / 2:
		print(2)
	elif t == h:
		print(1)
	else:
		k = ceil(t / (2 * t - h))
		dif1 = abs(t * (2 * k - 1) - h * k)
		dif2 = abs(t * (2 * k - 3) - h * (k - 1))
		if dif1 * (2 * k - 3) < dif2 * (2 * k - 1):
			print(int(2 * k - 1))
		else:
			print(int(2 * k - 3))


from decimal import Decimal

def solve(h, c, t):
	if (h + c) / 2 >= t:
		return 2
	k = (t - h) // (h + c - 2 * t)
	delta = lambda k: abs(Decimal(k * (h + c) + h) / (2 * k + 1) - t)
	candidates = ((k, delta(k)), (k + 1, delta(k + 1)))
	return sorted(candidates, key=lambda x: x[1])[0][0] * 2 + 1
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	k = solve(h, c, t)
	print(k)


import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
from typing import List

def solve(H, C, T):
	if T >= H:
		return 1
	if T <= (H + C) // 2:
		return 2
	k = int((T - H) / (H + C - 2 * T))
	if abs(k * (H + C) + H - T * (2 * k + 1)) * (2 * k + 3) <= abs((k + 1) * (H + C) + H - T * (2 * k + 3)) * (2 * k + 1):
		return k * 2 + 1
	else:
		return k * 2 + 3
N = int(input())
ans = []
for i in range(N):
	(H, C, T) = map(int, input().split())
	ans.append(solve(H, C, T))
print('\n'.join(map(str, ans)))


for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if h <= t:
		print(1)
	elif (h + c) // 2 >= t:
		print(2)
	else:
		n_c = (h - t) // (2 * t - h - c)
		n_h = n_c + 1
		if abs(n_c * c + n_h * h - t * (n_c + n_h)) * (n_c + n_h + 2) > abs(n_c * c + n_h * h + h + c - t * (n_c + n_h + 2)) * (n_c + n_h):
			print(n_c + n_h + 2)
		else:
			print(n_c + n_h)


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	if a == c:
		print(1)
		continue
	if (a + b) / 2 == c:
		print(2)
		continue
	temp = -1
	l = 2
	r = c + 1
	x = 2
	while l < r:
		mid = (l + r) // 2
		if (mid * a + (mid - 1) * b) / (2 * mid - 1) <= c:
			x = mid
			r = mid
		else:
			l = mid + 1
	y = x - 1
	ans2 = (a + b) / 2
	ans1 = (a * x - a + b * y - b) * (x + y)
	ans = (a * x + b * y) * (x + y - 2)
	pk = (x + y) * (x + y - 2)
	if 2 * c * pk >= ans + ans1:
		if abs(ans2 - c) <= abs(c - (a * x - a + b * y - b) / (x + y - 2)):
			print(2)
		else:
			print(x + y - 2)
	elif abs(ans2 - c) <= abs(c - (a * x + b * y) / (x + y)):
		print(2)
	else:
		print(x + y)


T = int(input())
o = []
for i in range(T):
	(h, c, t) = input().split()
	h = int(h)
	c = int(c)
	t = int(t)
	s = (h + c) / 2
	if t >= h:
		o.append(1)
	elif t <= s:
		o.append(2)
	else:
		i = (h - t) / (2 * t - (h + c))
		if i == int(i):
			i = int(i)
			o.append(2 * i + 1)
		else:
			i = int(i)
			aprev = abs((i * (h + c - 2 * t) + h - t) / (2 * i + 1))
			i += 1
			acur = abs((i * (h + c - 2 * t) + h - t) / (2 * i + 1))
			if acur >= aprev:
				o.append((i - 1) * 2 + 1)
			else:
				o.append(i * 2 + 1)
for i in range(T):
	print(o[i])


import sys
buff_readline = sys.stdin.readline
readline = sys.stdin.readline
INF = 2 ** 62 - 1

def read_int():
	return int(buff_readline())

def read_int_n():
	return list(map(int, buff_readline().split()))

def read_float():
	return float(buff_readline())

def read_float_n():
	return list(map(float, buff_readline().split()))

def read_str():
	return readline().strip()

def read_str_n():
	return readline().strip().split()

def error_print(*args):
	print(*args, file=sys.stderr)

def mt(f):
	import time

	def wrap(*args, **kwargs):
		s = time.time()
		ret = f(*args, **kwargs)
		e = time.time()
		error_print(e - s, 'sec')
		return ret
	return wrap

class Bisect:

	def __init__(self, func):
		self.__func = func

	def bisect_left(self, x, lo, hi):
		while lo < hi:
			mid = (lo + hi) // 2
			if self.__func(mid) < x:
				lo = mid + 1
			else:
				hi = mid
		return lo

	def bisect_right(self, x, lo, hi):
		while lo < hi:
			mid = (lo + hi) // 2
			if x < self.__func(mid):
				hi = mid
			else:
				lo = mid + 1
		return lo
from fractions import Fraction

def slv(H, C, T):
	if 2 * T <= H + C:
		return 2

	def f(n):
		m = n - 1
		t = Fraction(n * H + m * C, n + m)
		return -t
	i = Bisect(f).bisect_left(-T, 1, 10 ** 9)
	if abs(T + f(i)) >= abs(T + f(i - 1)):
		i -= 1
	if abs(T + f(i)) > abs(T + f(i + 1)):
		i += 1
	i += i - 1
	return i

def ref(H, C, T):
	n = 0
	m = 0
	d = (INF, -1)
	for i in range(1000):
		n += 1
		t = (n * H + m * C) / (n + m)
		d = min(d, (abs(T - t), n + m))
		m += 1
		t = (n * H + m * C) / (n + m)
		d = min(d, (abs(T - t), n + m))
	return d[1]

def main():
	T = read_int()
	for _ in range(T):
		(H, C, T) = read_int_n()
		print(slv(H, C, T))
main()


from sys import stdin
input = lambda : stdin.readline().strip()
char = [chr(i) for i in range(97, 123)]
CHAR = [chr(i) for i in range(65, 91)]
mp = lambda : list(map(int, input().split()))
INT = lambda : int(input())
rn = lambda : range(INT())
mod = 10000000007
from math import ceil, sqrt, factorial, gcd
for _ in rn():
	(h, c, t) = mp()
	x = 1
	if 2 * t - h - c <= 0:
		print(2)
	else:
		x = max(1, (t - c) // (2 * t - h - c))
		y = x + 1
		val1 = x * h + (x - 1) * c
		val2 = y * h + (y - 1) * c
		m1 = abs(t * (2 * x - 1) - val1) / (2 * x - 1)
		m2 = abs(t * (2 * y - 1) - val2) / (2 * y - 1)
		if m1 <= m2:
			print(2 * x - 1)
		else:
			print(2 * y - 1)


from math import ceil, floor
from decimal import Decimal

def calculate(x, y, n):
	return Decimal(x * n + y * (n - 1)) / Decimal(2 * n - 1)

def ca(x, y):
	return (x + y) / 2
for _ in range(int(input())):
	(x, y, c) = map(int, input().split())
	ans1 = 2
	if (x + y) / 2 >= c:
		print(ans1)
		continue
	ans2 = floor((y - c) / (x + y - 2 * c))
	ans3 = ceil((y - c) / (x + y - 2 * c))
	if ans2 == 0:
		ans2 = ans3
	elif abs(c - calculate(x, y, ans2)) > abs(c - calculate(x, y, ans3)):
		ans2 = ans3
	if abs(ca(x, y) - c) > abs(c - calculate(x, y, ans2)):
		print(ans2 * 2 - 1)
	elif abs(calculate(x, y, ans2) - c) > abs(c - ca(x, y)):
		print(ans1)
	else:
		print(min(ans1, ans2 * 2 - 1))


import sys
from decimal import *
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		(H, C, T) = [int(x) for x in input().split()]
		if H == T:
			print(1)
			continue
		if (H + C) / 2 == T:
			print(2)
			continue
		if (H + C) / 2 > T:
			print(2)
			continue

		def isOK(mid):
			if ((H + C) * mid + H) / (2 * mid + 1) > T:
				return True
			else:
				return False
		ok = 0
		ng = 10 ** 20
		while abs(ok - ng) > 1:
			mid = (ok + ng) // 2
			if isOK(mid):
				ok = mid
			else:
				ng = mid
		if abs(Decimal(str(T)) - Decimal(str((H + C) * ok + H)) / Decimal(str(2 * ok + 1))) > abs(Decimal(str(T)) - Decimal(str((H + C) * ng + H)) / Decimal(str(2 * ng + 1))):
			print(ng * 2 + 1)
		else:
			print(ok * 2 + 1)
main()


import math
from sys import stdin, stdout
import sys
import fractions
mod = 1000000007
F = fractions.Fraction
t = int(stdin.readline())
while t > 0:
	(h, c, tt) = list(map(int, stdin.readline().split()))
	mini = sys.maxsize
	ans = 0
	if 2 * tt > h + c:
		low = 1
		high = 1000000
		mid = low + (high - low) // 2
		x = 0
		while low <= high:
			mid = low + (high - low) // 2
			if mid < (h - tt) / (2 * tt - (h + c)):
				x = mid
				low = mid + 1
			else:
				high = mid - 1
		if mini > abs(tt - F(h * (x + 1) + c * x, 2 * x + 1)):
			mini = abs(tt - F(h * (x + 1) + c * x, 2 * x + 1))
			ans = 2 * x + 1
		low = 1
		high = 1000000
		mid = low + (high - low) // 2
		x = 0
		while low <= high:
			mid = low + (high - low) // 2
			if mid >= (h - tt) / (2 * tt - (h + c)):
				x = mid
				high = mid - 1
			else:
				low = mid + 1
		if mini > abs(tt - F(h * (x + 1) + c * x, 2 * x + 1)):
			mini = abs(tt - F(h * (x + 1) + c * x, 2 * x + 1))
			ans = 2 * x + 1
	else:
		ans = 2
	stdout.write(f'{ans}\n')
	t -= 1


q = int(input())
for i in range(q):
	(h, c, t) = list(map(int, input().split()))
	if 2 * t <= h + c:
		print(2)
	else:
		k = (h - t) / (2 * t - h - c)
		m = int(k)
		n = m + 1
		x = abs((m + 1) * h + m * c - (2 * m + 1) * t) / (2 * m + 1)
		y = abs((n + 1) * h + n * c - (2 * n + 1) * t) / (2 * n + 1)
		if x <= y:
			print(2 * m + 1)
		else:
			print(2 * n + 1)


_ = int(input())
h = 0
c = 0
t = 0

def fn(cnt):
	return t * (2 * cnt - 1) - cnt * h - (cnt - 1) * c
for __ in range(_):
	(h, c, t) = [int(a) for a in input().split()]
	if h + c >= t * 2:
		print(2)
		continue
	l = 1
	r = 1
	while fn(r) < 0:
		r *= 2
	l = r // 2
	while l < r:
		mid = (l + r) // 2
		if fn(mid) < 0:
			l = mid + 1
		else:
			r = mid
	if abs(fn(l)) * (2 * l - 3) < abs(fn(l - 1)) * (2 * l - 1):
		print(2 * l - 1)
	else:
		print(2 * l - 3)


t = int(input())
for i in range(t):
	(h, c, t) = map(int, input().split())
	x = t - (h + c) / 2
	if x <= 0:
		print(2)
	else:
		n = (h - c) // (2 * t - h - c)
		if n % 2 == 0:
			if abs(x - (h - c) / (2 * (n + 1))) > abs(x - (h - c) / (2 * (n + 3))):
				print(n + 3)
			else:
				print(n + 1)
		elif abs(x - (h - c) / (2 * n)) > abs(x - (h - c) / (2 * (n + 2))):
			print(n + 2)
		else:
			print(n)


t = int(input())
for x in range(t):
	(h, c, t) = map(int, input().split())
	if t >= h:
		print(1)
	elif t <= (h + c) / 2:
		print(2)
	else:
		k = (c - t) // (h + c - 2 * t)
		prev = abs((k * (h + c - 2 * t) - c + t) / (2 * k - 1))
		cur = abs(((k + 1) * (h + c - 2 * t) - c + t) / (2 * k + 1))
		if prev <= cur:
			print(2 * k - 1)
		else:
			print(2 * k + 1)


from sys import stdin, stdout
input = lambda : stdin.readline().strip()
fast_print = stdout.write
from math import sqrt, floor, ceil
from bisect import bisect_right

def dist(n, h, c, t):
	return abs(n * h + (n - 1) * c - t * (2 * n - 1))
T = int(input())
for _ in range(T):
	(h, c, t) = map(int, input().split())
	if h == t:
		fast_print('1\n')
	elif h + c - 2 * t >= 0:
		fast_print('2\n')
	else:
		n0 = max((c - t) // (h + c - 2 * t), 1)
		n1 = max(n0 + 1, 2)
		first = dist(n0, h, c, t) * (2 * n1 - 1)
		second = dist(n1, h, c, t) * (2 * n0 - 1)
		m = min(first, second)
		ans = 10 ** 50
		if m == first:
			ans = min(ans, n0)
		if m == second:
			ans = min(ans, n1)
		ans = 2 * ans - 1
		fast_print(str(ans) + '\n')


printn = lambda x: print(x, end='')
inn = lambda : int(input())
inl = lambda : list(map(int, input().split()))
inm = lambda : map(int, input().split())
ins = lambda : input().strip()
DBG = True
BIG = 10 ** 18
R = 10 ** 9 + 7

def ddprint(x):
	if DBG:
		print(x)

def foo(h, c, n):
	return (n * h + (n - 1) * c) / (2 * n - 1)

def bar(h, c, t, n):
	return n * h + (n - 1) * c == t * (2 * n - 1)
ttt = inn()
for tt in range(ttt):
	(h, c, t) = inm()
	if 5 * h + c <= 6 * t:
		print(1)
	elif 2 * t <= h + c:
		print(2)
	else:
		mn = 1
		mx = 10 ** 16
		found = False
		while mx - mn > 1:
			mid = (mn + mx) // 2
			if bar(h, c, t, mid):
				found = True
				break
			elif foo(h, c, mid) < t:
				mx = mid
			else:
				mn = mid
		if found:
			print(2 * mid - 1)
			continue
		x = 2 * (2 * mn - 1) * (2 * mx - 1) * t
		y = (2 * mx - 1) * (mn * h + (mn - 1) * c) + (2 * mn - 1) * (mx * h + (mx - 1) * c)
		if x < y:
			print(2 * mx - 1)
		else:
			print(2 * mn - 1)


T = int(input())
for t in range(T):
	(h, c, t) = map(int, input().split())
	h *= 2
	c *= 2
	t *= 2
	m = (h + c) // 2
	if t <= m:
		print(2)
	else:
		(hc, tc) = (h - m, t - m)
		tms = hc // tc
		apr = [2434841, 1]
		for i in range(tms - 5, tms + 5):
			if i % 2 and abs(tc - hc / i) < apr[0]:
				apr = [abs(tc - hc / i), i]
		print(apr[1])


import math
t = int(input())
for i in range(0, t):
	(h, c, d) = map(int, input().split(' '))
	if d <= (h + c) / 2:
		print(2)
	else:
		ex = (h - d) // (2 * d - h - c)
		if abs(ex * (h + c) + h - d * (2 * ex + 1)) * (2 * ex + 3) <= abs((ex + 1) * (h + c) + h - d * (2 * ex + 3)) * (2 * ex + 1):
			print(2 * ex + 1)
		else:
			print(2 * ex + 3)


from fractions import Fraction
import sys
input = sys.stdin.readline
t = int(input())
g = [list(map(Fraction, input().split())) for i in range(t)]
ans = [0] * t
for i in range(t):
	h = g[i][0]
	c = g[i][1]
	x = g[i][2]
	if x >= h:
		ans[i] = 1
	elif x <= (h + c) / 2:
		ans[i] = 2
	else:
		l = -1
		r = pow(10, 8)
		while r - l > 1:
			mid = l + (r - l) // 2
			v = 2 * mid + 1
			if Fraction((c * mid + h * (mid + 1)) / v) < x:
				r = mid
			else:
				l = mid
		if Fraction(abs(x - (c * r + h * (r + 1)) / (r * 2 + 1))) < Fraction(abs(x - (c * (r - 1) + h * r) / (r * 2 - 1))):
			ans[i] = r * 2 + 1
		else:
			ans[i] = r * 2 - 1
for i in range(t):
	print(ans[i])


import sys, math
from collections import deque

def solve():
	return
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if t <= (h + c) / 2:
		print(2)
	else:
		x = (h - t) // (2 * t - h - c)
		v1 = (x + 1) * h + x * c
		v2 = (x + 2) * h + (x + 1) * c
		if abs(v1 - (2 * x + 1) * t) / (2 * x + 1) <= abs(t * (2 * x + 3) - v2) / (2 * x + 3):
			print(2 * x + 1)
		else:
			print(2 * x + 3)


from math import floor
from sys import stdin
input = stdin.readline

def compare_answer(hot, cold, target, moves, ans):
	min_temperature = ans // 2 * (hot + cold) + ans % 2 * hot
	min_error = abs(min_temperature - ans * target) * moves
	temperature = moves // 2 * (hot + cold) + moves % 2 * hot
	error = abs(temperature - moves * target) * ans
	if error < min_error:
		ans = moves
	return ans

def main():
	test = int(input())
	for _ in range(test):
		(hot, cold, target) = map(int, input().split())
		avg = (hot + cold) / 2
		if target >= hot:
			ans = 1
		elif avg >= target:
			ans = 2
		else:
			moves = floor((hot - avg) / (target - avg))
			if moves % 2 == 0:
				moves -= 1
			ans = 2
			ans = compare_answer(hot, cold, target, moves, ans)
			ans = compare_answer(hot, cold, target, moves + 2, ans)
		print(ans)
main()


from collections import *
from bisect import *
from math import *
from heapq import *
from fractions import *
import sys
input = sys.stdin.readline
t1 = int(input())
while t1:
	t1 -= 1
	(h, c, t) = map(int, input().split())
	if h == t:
		print(1)
		continue
	try:
		x = (c - t) / (h + c - 2 * t)
	except:
		print(2)
		continue
	if (h + c) / 2 >= t:
		print(2)
		continue
	x = int(x)
	avg1 = (x + 1) * h
	avg1 += x * c
	avg1 = Fraction(avg1, 2 * x + 1)
	ans = 2 * x + 1
	r = abs(avg1 - t)
	x -= 1
	avg1 = (x + 1) * h
	avg1 += x * c
	avg1 = Fraction(avg1, 2 * x + 1)
	if abs(avg1 - t) <= r:
		ans = 2 * x + 1
		r = abs(avg1 - t)
	print(ans)


t = int(input())
for test in range(t):
	inp = input().split()
	h = int(inp[0])
	c = int(inp[1])
	t = int(inp[2])
	if t + t <= c + h:
		print(2)
		continue
	if t >= h:
		print(1)
		continue
	k = (h - t) // (t + t - c - h)
	if (h - t) % (t + t - c - h) == 0:
		print(k + k + 1)
		continue
	k += 1
	if (k + k + 1) * (k * h + k * c - c) + (k + k - 1) * (k * h + k * c + h) > (t + t) * (k + k - 1) * (k + k + 1):
		print(k + k + 1)
	else:
		print(k + k - 1)


t = int(input())
ans = [0] * t
for i in range(t):
	(h, c, obj) = map(int, input().split())
	ave = (h + c) / 2
	if obj <= ave:
		ans[i] = 2
	else:
		x = obj - ave
		y = (h - c) / 2
		z = y // x
		if z % 2 == 0:
			z -= 1
		temp0 = abs(obj - ave - y / z)
		temp1 = abs(obj - ave - y / (2 + z))
		if temp0 <= temp1:
			ans[i] = z
		else:
			ans[i] = z + 2
for i in range(t):
	print(int(ans[i]))


for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if h + c >= 2 * t:
		print(2)
	elif t >= h:
		print(1)
	else:
		x = 2 * t - h - c
		k = (h - c + x) // (2 * x)
		test1 = abs((8 * k ** 2 - 2) * t - (h * k + c * k - c) * (4 * k + 2))
		test2 = abs((8 * k ** 2 - 2) * t - (h * (k + 1) + c * (k + 1) - c) * (4 * k - 2))
		test3 = abs((8 * k ** 2 - 2) * t - (h + c) * (4 * k ** 2 - 1))
		if k == 1:
			if min(test1, test2, test3) == test1:
				print(2 * k - 1)
			elif min(test1, test2, test3) == test3:
				print(2)
			else:
				print(2 * k + 1)
		elif min(test1, test2, test3) == test3:
			print(2)
		elif min(test1, test2, test3) == test1:
			print(2 * k - 1)
		else:
			print(2 * k + 1)


def f(x):
	return abs(((x - 1) * (c + h) + h) / (2 * x - 1) - temp)
t = int(input())
for you in range(t):
	l = input().split()
	h = int(l[0])
	c = int(l[1])
	temp = int(l[2])
	if temp <= (c + h) / 2:
		print(2)
	elif temp >= h:
		print(1)
	else:
		poss = int((temp - c) / (2 * temp - h - c))
		num1 = 2 * temp * (2 * poss - 1) * (2 * poss + 1)
		num2 = ((poss - 1) * (c + h) + h) * (2 * poss + 1) + (poss * (c + h) + h) * (2 * poss - 1)
		if num1 >= num2:
			print(2 * poss - 1)
		else:
			print(2 * poss + 1)


from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10 ** 5)
input = sys.stdin.readline
sqrt = math.sqrt

def LI():
	return list(map(int, input().split()))

def LF():
	return list(map(float, input().split()))

def LI_():
	return list(map(lambda x: int(x) - 1, input().split()))

def II():
	return int(input())

def IF():
	return float(input())

def S():
	return input().rstrip()

def LS():
	return S().split()

def IR(n):
	return [II() for _ in range(n)]

def LIR(n):
	return [LI() for _ in range(n)]

def FR(n):
	return [IF() for _ in range(n)]

def LFR(n):
	return [LI() for _ in range(n)]

def LIR_(n):
	return [LI_() for _ in range(n)]

def SR(n):
	return [S() for _ in range(n)]

def LSR(n):
	return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

def solve():

	def f(m):
		return c * (m - 1) + h * m
	ans = []
	for i in range(II()):
		(h, c, t) = LI()
		if (h + c) / 2 >= t:
			ans.append(2)
			continue
		l = 10 ** 6
		r = 1
		while l - r > 1:
			m = (r + l) // 2
			if f(m) < t * (2 * m - 1):
				l = m
			else:
				r = m
		fl = abs(f(l) - t * (2 * l - 1)) * (2 * r - 1)
		fr = abs(f(r) - t * (2 * r - 1)) * (2 * l - 1)
		if fl < fr:
			ans.append(l * 2 - 1)
		else:
			ans.append(r * 2 - 1)
	for ai in ans:
		print(ai)
	return
solve()


T = int(input())
for _ in range(T):
	(h, c, t) = list(map(int, input().split()))
	if h + c >= t * 2:
		print(2)
	else:
		(l, r) = (0, 10 ** 9)
		while r - l > 1:
			m = (l + r) // 2
			if h * (m + 1) + c * m >= t * (2 * m + 1):
				l = m
			else:
				r = m
		if (2 * l + 1) * ((2 * r + 1) * t - (h * (r + 1) + c * r)) >= (2 * r + 1) * (h * (l + 1) + c * l - (2 * l + 1) * t):
			print(l * 2 + 1)
		else:
			print(r * 2 + 1)


import sys
input = sys.stdin.buffer.readline

def print(val):
	sys.stdout.write(str(val) + '\n')

def temp(x, t, h, c):
	return abs((t * (2 * x + 1) - ((x + 1) * h + x * c)) / (2 * x + 1))

def prog():
	for _ in range(int(input())):
		(h, c, t) = map(int, input().split())
		if t <= (h + c) / 2:
			print(2)
		else:
			R = 10 ** 6
			L = 0
			while R != L:
				s = (R - L) // 3
				m1 = L + s
				m2 = R - s
				if temp(m2, t, h, c) >= temp(m1, t, h, c):
					R = m2 - 1
				else:
					L = m1 + 1
			print(2 * R + 1)
prog()


T = int(input())
for t_itr in range(T):
	(H, C, T) = list(map(int, input().rstrip().split()))
	if T >= H:
		print(1)
	elif 2 * T <= H + C:
		print(2)
	else:
		n = (C - T) // (H + C - 2 * T)
		n1 = n + 1
		d1 = H * n + C * (n - 1) - T * (2 * n - 1)
		d2 = H * n1 + C * (n1 - 1) - T * (2 * n1 - 1)
		if abs(d1 / (2 * n - 1)) <= abs(d2 / (2 * n1 - 1)):
			print(2 * n - 1)
		else:
			print(2 * n1 - 1)


import sys
from math import ceil, floor
from functools import cmp_to_key
input = sys.stdin.readline

def main():
	tc = int(input())
	cmp = lambda a, b: a[0] * b[1] - a[1] * b[0]
	cmp = cmp_to_key(cmp)
	for _ in range(tc):
		(h, c, t) = map(int, input().split())
		if h + c == 2 * t:
			print(2)
		else:
			x = max(0, (t - h) // (h + c - 2 * t))
			cands = [(h + c - 2 * t, 2), (x * (h + c) + h - (2 * x + 1) * t, 2 * x + 1), ((x + 1) * (h + c) + h - (2 * x + 3) * t, 2 * x + 3)]
			cands = map(lambda t: (abs(t[0]), t[1]), cands)
			print(min(cands, key=cmp)[1])
main()


(T,) = map(int, input().split())

def f(h, c, n):
	return (h * (n + 1) + c * n) / (2 * n + 1)

def B(h, c, n):
	return 2 * n + 1

def C(h, c, n):
	return h * (n + 1) + c * n

def H(h, c, t, n):
	return 2 * t * B(h, c, n) * B(h, c, n + 1) - C(h, c, n + 1) * B(h, c, n) - C(h, c, n) * B(h, c, n + 1) >= 0
for _ in range(T):
	(h, c, t) = map(int, input().split())
	mx = 10 ** 18
	if 2 * t <= h + c:
		print(2)
	else:
		n = (t - h) // (h + c - 2 * t)
		if H(h, c, t, n):
			print(2 * n + 1)
		else:
			print(2 * (n + 1) + 1)


import math

def minOdd(n, m, h, c, t):
	d = abs((n + 1) * (2 * m + 1) * h + (2 * m + 1) * n * c - t * (2 * n + 1) * (2 * m + 1)) - abs((m + 1) * (2 * n + 1) * h + (2 * n + 1) * m * c - t * (2 * n + 1) * (2 * m + 1))
	if d > 0:
		return m
	elif d < 0:
		return n
	else:
		return min(n, m)

def ans(odd, h, c, t):
	d = abs(2 * (odd + 1) * h + 2 * odd * c - 2 * (2 * odd + 1) * t) - abs((h + c) * (2 * odd + 1) - 2 * (2 * odd + 1) * t)
	if d < 0:
		return 2 * odd + 1
	elif d > 0:
		return 2
	else:
		return min(2, 2 * odd + 1)
T = int(input())
for _ in range(T):
	(h, c, t) = map(int, input().split())
	av = (h + c) / 2
	if t <= av:
		print(2)
		continue
	n = (h - t) / (2 * t - (h + c))
	if math.floor(n) == math.ceil(n):
		print(int(2 * n + 1))
		continue
	n1 = math.ceil(n)
	n2 = math.floor(n)
	m = minOdd(n1, n2, h, c, t)
	print(ans(m, h, c, t))


import math
from fractions import Fraction

def dist(x, y):
	return abs(x - y)
for _ in range(int(input())):
	(h, c, t) = map(int, input().strip().split())
	c0 = (c - t) / (h + c - 2 * t) if h + c != 2 * t else 0
	c1 = max(int(math.ceil(c0)), 1)
	c2 = max(int(math.floor(c0)), 1)
	x1 = (dist(t, Fraction(h + c, 2)), 2)
	x2 = (dist(t, Fraction(c1 * h + (c1 - 1) * c, 2 * c1 - 1)), 2 * c1 - 1)
	x3 = (dist(t, Fraction(c2 * h + (c2 - 1) * c, 2 * c2 - 1)), 2 * c2 - 1)
	print(min(x1, x2, x3)[1])


import fractions

def calc_temp(h, c, curr):
	numerator = h * curr[0] + c * curr[1]
	denominator = curr[0] + curr[1]
	return fractions.Fraction(numerator, denominator)

def solve(h, c, t):
	if h == t or t >= c + 5 / 6 * (h - c):
		return 1
	if t <= (h + c) / 2:
		return 2
	start = 1
	end = pow(10, 10)
	curr = None
	while start <= end:
		mid = (start + end) // 2
		curr = (mid + 1, mid)
		current_temperature = calc_temp(h, c, curr)
		if current_temperature == t:
			return curr[0] + curr[1]
		if current_temperature < t:
			end = mid - 1
		if current_temperature > t:
			start = mid + 1
	ans = None
	deviation = h - t
	for i in range(-1, 2):
		temp = (curr[0] + i, curr[1] + i)
		current_temperature = calc_temp(h, c, temp)
		if abs(current_temperature - t) < deviation:
			deviation = abs(current_temperature - t)
			ans = temp[0] + temp[1]
	return ans

def main():
	t = int(input())
	test_case_number = 1
	while test_case_number <= t:
		(h, c, temp) = map(int, input().split())
		print(solve(h, c, temp))
		test_case_number += 1
main()


t = int(input())
for i in range(t):
	(h1, c1, t1) = input().split(' ')
	h = int(h1)
	c = int(c1)
	t = int(t1)
	if t <= (h + c) / 2:
		print(2)
	else:
		x = (t - c) // (2 * t - h - c)
		m = ((h + c) * x - c) / (2 * x - 1) - t
		n = t - ((h + c) * x + h) / (2 * x + 1)
		if m < n:
			print(2 * x - 1)
		elif m == n and m == int(m):
			print(2 * x - 1)
		elif m == n and m != int(m):
			print(2 * x + 1)
		else:
			print(2 * x + 1)


for _ in range(int(input())):
	(p, a, t) = map(int, input().split())
	if t <= (p + a) / 2:
		print(2)
	else:
		k = (p - t) // (2 * t - p - a)
		if abs((2 * k + 3) * t - k * p - 2 * p - k * a - a) * (2 * k + 1) < abs((2 * k + 1) * t - k * p - p - k * a) * (2 * k + 3):
			print(2 * k + 3)
		else:
			print(2 * k + 1)


from decimal import Decimal
t1 = int(input())
while t1:
	t1 += -1
	(h, c, t) = map(int, input().split())
	if h == t:
		print(1)
	elif h + c >= 2 * t:
		print(2)
	else:
		x = (c - h) // (h + c - 2 * t)
		mn = 9999999999999999999
		ans = 0
		for i in range(max(1, x - 10), x + 10):
			a2 = Decimal(i // 2)
			a1 = Decimal(i - a2)
			v1 = Decimal((a1 * h + a2 * c) / i)
			q1 = Decimal(abs(v1 - t))
			if q1 < mn:
				mn = q1
				ans = i
		q3 = abs((h + c) / 2 - t)
		if q3 <= mn:
			mn = q3
			ans = 2
		if abs(t - h) <= mn:
			ans = 1
		print(ans)


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10 ** 9 + 7
inf = float('inf')

def I():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))
T = I()

def f(x):
	if (x + 1) * h + (x - 1) * c - 2 * x * t >= 0:
		return (x + 1) * h + (x - 1) * c - 2 * x * t
	return 2 * x * t - ((x + 1) * h + (x - 1) * c)
for _ in range(T):
	(h, c, t) = LI()
	x = (h + c) / 2
	if t <= x:
		print(2)
		continue
	y = (h - c) / (2 * t - h - c)
	z = int(y)
	if z % 2:
		tmp = f(z)
		tmp2 = f(z + 2)
		if (z + 2) * tmp <= z * tmp2:
			if tmp / z == abs(x - t):
				print(min(z, 2))
			elif tmp / z < abs(x - t):
				print(z)
			else:
				print(2)
		elif tmp2 / (z + 2) == abs(x - t):
			print(min(z + 2, 2))
		elif tmp2 / (z + 2) < abs(x - t):
			print(z + 2)
		else:
			print(2)
	else:
		tmp = f(z - 1)
		tmp2 = f(z + 1)
		if (z + 1) * tmp <= (z - 1) * tmp2:
			if tmp / (z - 1) == abs(x - t):
				print(min(z - 1, 2))
			elif tmp / (z - 1) < abs(x - t):
				print(z - 1)
			else:
				print(2)
		elif tmp2 / (z + 1) == abs(x - t):
			print(min(z + 1, 2))
		elif tmp2 / (z + 1) < abs(x - t):
			print(z + 1)
		else:
			print(2)


from __future__ import division, print_function
import itertools
import sys
import os
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	input = raw_input
	range = xrange
	filter = itertools.ifilter
	map = itertools.imap
	zip = itertools.izip

def is_it_local():
	script_dir = str(os.getcwd()).split('/')
	username = 'dipta007'
	return username in script_dir

def READ(fileName):
	if is_it_local():
		sys.stdin = open(f'./{fileName}', 'r')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
if not is_it_local():
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
	input = lambda : sys.stdin.readline().rstrip('\r\n')

def input1(type=int):
	return type(input())

def input2(type=int):
	[a, b] = list(map(type, input().split()))
	return (a, b)

def input3(type=int):
	[a, b, c] = list(map(type, input().split()))
	return (a, b, c)

def input_array(type=int):
	return list(map(type, input().split()))

def input_string():
	s = input()
	return list(s)
import math, fractions
F = fractions.Fraction

def main():
	t = input1()
	for ci in range(t):
		(h, c, t) = input3()
		avg = F(h + c, 2)
		res = 2
		mx = abs(t - avg)
		low = 0
		high = 40000000
		now = 0
		while low <= high:
			mid = (low + high) // 2
			odd = mid * 2 + 1
			m = (mid * (h + c) + h) / odd
			if m <= t:
				high = mid - 1
				now = mid
			else:
				low = mid + 1
		for i in range(max(0, now - 10), now + 10):
			odd = i * 2 + 1
			m = F(i * (h + c) + h, odd)
			if abs(m - t) < mx:
				mx = abs(m - t)
				res = odd
			elif abs(m - t) == mx:
				res = min(res, odd)
		print(res)
	pass
main()


import math
from decimal import Decimal
n = int(input())
for i in range(n):
	(h, c, t) = map(int, input().split())
	if t <= (h + c) / 2:
		print(2)
		continue
	avg = (h - t) / (2 * t - h - c)
	a = max(0, math.floor(avg) + 1)
	b = max(0, math.floor(avg))
	t1 = Decimal((a + 1) * h + a * c) / (2 * a + 1)
	t2 = Decimal((b + 1) * h + b * c) / (2 * b + 1)
	ans = 0
	if abs(t - t2) <= abs(t - t1):
		ans = b
	else:
		ans = a
	print(2 * ans + 1)


def getCups(h, c, t, x):
	x = round(x)
	minDiff = (100000000000, 1)
	cups = -100
	for i in range(int(x) - 1 - 2, int(x) + 2 + 2):
		if i % 2 == 1:
			v = (h * ((i + 1) / 2) + c * ((i - 1) / 2), i)
		else:
			v = ((h + c) / 2, 1)
		diff = (abs(v[0] - t * i), i)
		if diff[0] * minDiff[1] < minDiff[0] * diff[1]:
			minDiff = diff
			cups = i
	return cups
t = int(input())
for _ in range(t):
	(h, c, t) = [int(i) for i in input().split()]
	avg = (h + c) / 2
	if t >= h:
		print(1)
	elif t <= avg:
		print(2)
	else:
		x = (h - c) / (2 * t - h - c)
		print(getCups(h, c, t, x))


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from math import factorial
from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush

def RL():
	return map(int, sys.stdin.readline().rstrip().split())

def RLL():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def N():
	return int(input())

def comb(n, m):
	return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0

def perm(n, m):
	return factorial(n) // factorial(n - m) if n >= m else 0

def mdis(x1, y1, x2, y2):
	return abs(x1 - x2) + abs(y1 - y2)
mod = 998244353
INF = float('inf')

def main():
	for _ in range(N()):
		(h, c, t) = RL()
		avg = (h + c) / 2
		if t <= avg:
			print(2)
		else:
			num = (t - h) // (c + h - 2 * t)
			r1 = (num + 1) * h + num * c
			r2 = (num + 2) * h + (num + 1) * c
			if abs(r1 - t * (2 * num + 1)) / (2 * num + 1) <= abs(r2 - t * (2 * num + 3)) / (2 * num + 3):
				print(2 * num + 1)
			else:
				print(2 * num + 3)
main()


def solve(th, tc, t):
	ans = 0
	if th == t:
		ans = 1
	elif 2 * t <= th + tc:
		ans = 2
	else:
		k = (th - tc) / (2 * t - th - tc)
		if (th - tc) % (2 * t - th - tc) == 0:
			if k % 2 == 0:
				ans = int(k) + 1
			else:
				ans = int(k)
		else:
			k_int = int(k)
			if k_int % 2 == 1:
				i_candidate = k_int
			else:
				i_candidate = k_int - 1
			if 1 / k - 1 / (i_candidate + 2) + 1e-15 > 1 / i_candidate - 1 / k:
				ans = i_candidate
			else:
				ans = i_candidate + 2
	return ans
AA = int(input())
for ___ in range(AA):
	(th, tc, t) = (int(k) for k in input().split(' '))
	answer = solve(th, tc, t)
	print(answer)


def check(h, c, x, t):
	return abs((x * (h + c - 2 * t) + t - c) / (2 * x - 1))

def answer(h, c, t):
	avg = (h + c) // 2
	if t <= avg:
		return 2
	x = (t - c) // (2 * t - h - c)
	if check(h, c, x, t) <= check(h, c, x + 1, t):
		return 2 * x - 1
	else:
		return 2 * x + 1
t = int(input())
for i in range(t):
	(h, c, t) = map(int, input().split())
	print(answer(h, c, t))


import sys, math
Tests = int(input())
for _ in range(Tests):
	(h, c, t) = map(int, sys.stdin.readline().split())
	if h == t:
		print(1)
	else:
		x = (h + c) / 2
		if x >= t:
			print(2)
		else:
			diff = t - x
			some = int(abs((c - h) // (2 * diff)))
			if some % 2 == 0:
				some += 1
			if diff - (h - c) / (2 * some) < abs(diff - (h - c) / (2 * (some - 2))):
				print(some)
			else:
				print(some - 2)


import sys
input = sys.stdin.buffer.readline

def I():
	return list(map(int, input().split()))

def sieve(n):
	a = [1] * n
	for i in range(2, n):
		if a[i]:
			for j in range(i * i, n, i):
				a[j] = 0
	return a
for __ in range(int(input())):
	(h, c, t) = I()
	if h == t:
		print(1)
		continue
	if (h + c) / 2 >= t:
		print(2)
		continue
	if t >= (h * 2 + c) / 3:
		x1 = (h * 2 + c) / 3
		x2 = h
		if abs(x2 - t) <= abs(x1 - t):
			print(1)
		else:
			print(3)
		continue
	l = 1
	r = 10 ** 30
	ans = 10 ** 100
	left = t - (h + c) / 2
	while l <= r:
		mid = (l + r) // 2
		n = mid
		delta = (h - c) / (2 * (2 * n + 1))
		if delta == left:
			ans = n
			break
		if delta < left:
			ans = n
			r = mid - 1
		else:
			l = mid + 1
	n = ans
	delta1 = (h - c) / (2 * (2 * n + 1))
	delta2 = (h - c) / (2 * (2 * n - 1))
	if abs(delta1 - left) < abs(delta2 - left):
		print(2 * n + 1)
	else:
		print(2 * n - 1)


def f(h: int, c: int, t: int) -> int:
	if h + c >= t * 2:
		return 2
	else:
		x = (h - t) // (t * 2 - h - c)
		lhs = (h * (x + 1) + x * c) * (x * 2 + 3) - t * (x * 2 + 1) * (x * 2 + 3)
		rhs = t * (x * 2 + 1) * (x * 2 + 3) - (h * (x + 2) + (x + 1) * c) * (x * 2 + 1)
		if lhs <= rhs:
			return x * 2 + 1
		else:
			return x * 2 + 3
T = int(input())
for _ in range(T):
	(h, c, t) = map(int, input().split())
	print(f(h, c, t))


from fractions import Fraction as F
from math import isclose
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if 2 * t <= h + c:
		print(2)
		continue

	def f(hot):
		return hot * h + (hot - 1) * c

	def g(hot):
		return abs(t - F(hot * h + (hot - 1) * c, hot * 2 - 1))
	lo = 1
	hi = 10 ** 9
	while lo < hi:
		mid = (hi + lo) // 2
		temp = f(mid)
		cmp = t * (mid * 2 - 1)
		if temp == cmp:
			print(mid * 2 - 1)
			break
		elif temp < cmp:
			hi = mid
		else:
			lo = mid + 1
	else:
		bi = 1
		for lo in range(max(1, lo - 10), lo + 10):
			if g(lo) < g(bi):
				bi = lo
		print(bi * 2 - 1)


import sys
input = sys.stdin.buffer.readline
nTests = int(input())
for _ in range(nTests):
	(h, c, t) = [int(zz) for zz in input().split()]
	if t <= (h + c) / 2:
		print(2)
	elif t == h:
		print(1)
	else:
		nHot = (t - c) // (2 * t - h - c)
		x = nHot
		den1 = 2 * x - 1
		den2 = 2 * x + 1
		num1 = abs(x * h + (x - 1) * c - t * den1)
		num2 = abs((x + 1) * h + x * c - t * den2)
		if num1 * den2 <= num2 * den1:
			print(2 * x - 1)
		else:
			print(2 * x + 1)


from sys import stdin
input = stdin.readline
from collections import deque
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
for _ in range(I()):
	(h, c, t) = R()
	if (h + c) / 2 >= t:
		print(2)
		continue
	k = int((t - h) / (h + c - 2 * t))
	print(2 * k + 1 if abs(k * (h + c) + h - t * (2 * k + 1)) * (2 * k + 3) <= abs((k + 1) * (h + c) + h - t * (2 * k + 3)) * (2 * k + 1) else 2 * k + 3)


for test_ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if t <= (h + c) // 2:
		print(2)
	else:
		t -= (h + c) / 2
		t1 = (h - c) / 2 / t
		(x1, x2) = (int((t1 - 1) // 2 * 2 + 1), int((t1 + 1) // 2 * 2 + 1))
		if (h - c) / (x1 * 2) - t <= t - (h - c) / (x2 * 2):
			print(x1)
		else:
			print(x2)


from sys import stdin
from decimal import *
inp = lambda : stdin.readline().strip()
t = int(inp())
for _ in range(t):
	(h, c, needed) = [int(x) for x in inp().split()]
	s = 10 ** 6 + 1
	l = 0
	x = 0
	prevWell = -1
	if needed == h:
		print(1)
	elif needed <= (h + c) // 2:
		print(2)
	else:
		while True:
			x = (s + l) // 2
			well = (h * x + c * (x - 1)) / (2 * x - 1)
			if well == needed:
				print(x + x - 1)
				break
			if well == prevWell:
				well = Decimal(h * x + c * (x - 1)) / Decimal(2 * x - 1)
				prevWell = Decimal(h * (x + 1) + c * x) / Decimal(x + 1 + x)
				otherWell = Decimal(h * (x - 1) + c * (x - 2)) / Decimal(x + x - 3)
				if abs(prevWell - needed) < abs(well - needed):
					if abs(prevWell - needed) < abs(otherWell - needed):
						print(x + 1 + x)
					else:
						print(x + x - 3)
				elif abs(well - needed) < abs(otherWell - needed):
					print(x + x - 1)
				else:
					print(x + x - 3)
				break
			if well < needed:
				s = x
			elif well > needed:
				l = x
			prevWell = well


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	mid = (a + b) / 2
	if c == a:
		print(1)
	elif c <= mid:
		print(2)
	elif c >= mid + (a - b) / 6 and c < a:
		d = mid + (a - b) / 6
		if abs(d - c) < abs(a - c):
			print(3)
		else:
			print(1)
	else:
		c -= mid
		d = []
		x = (a - b) // c
		if x % 2 == 0:
			xx = x // 2
			if xx % 2 == 0:
				h = max(6, x - 2)
				i = max(6, h - 4)
				j = max(6, h + 4)
			else:
				h = max(6, x)
				i = max(6, h - 4)
				j = max(6, h + 4)
			e = [abs((a - b) / h - c), h]
			f = [abs((a - b) / i - c), i]
			g = [abs((a - b) / j - c), j]
			d.append(e)
			d.append(f)
			d.append(g)
			d.sort()
			print(int(d[0][1] // 2))
		else:
			xx = (x + 1) // 2
			if xx % 2 == 0:
				h = max(6, x - 1)
				i = max(6, h + 4)
			else:
				h = max(6, x - 3)
				i = max(6, h + 4)
			e = [abs((a - b) / h - c), h]
			f = [abs((a - b) / i - c), i]
			d.append(e)
			d.append(f)
			d.sort()
			print(int(d[0][1] // 2))


from sys import stdin

def iinput():
	return int(stdin.readline())

def sinput():
	return input()

def minput():
	return map(int, stdin.readline().split())

def linput():
	return list(map(int, stdin.readline().split()))
T = iinput()
while T:
	T -= 1
	(h, c, t) = minput()
	if h == t:
		print(1)
	elif (h + c) // 2 >= t:
		print(2)
	else:
		k = (h - t) // (2 * t - h - c)
		if abs(k * (h + c) + h - t * (2 * k + 1)) * (2 * k + 3) <= abs((k + 1) * (h + c) + h - t * (2 * k + 3)) * (2 * k + 1):
			print(2 * k + 1)
		else:
			print(2 * k + 3)


import sys

def input():
	return sys.stdin.readline().rstrip()

def gcd(a, b):
	(a, b) = (min(a, b), max(a, b))
	if a == 0:
		return b
	else:
		return gcd(b % a, a)

class pos_rational:

	def __init__(self, a, b):
		self.numerator = a
		self.denominator = b

	def __eq__(self, other):
		val = self.numerator * other.denominator - other.numerator * self.denominator
		return val == 0

	def __lt__(self, other):
		val = self.numerator * other.denominator - other.numerator * self.denominator
		return val < 0

	def __gt__(self, other):
		val = self.numerator * other.denominator - other.numerator * self.denominator
		return val > 0

	def __ge__(self, other):
		return self == other or self > other

	def __le__(self, other):
		return self == other or self < other

def loss(two_n_plus_one, hot, cold, desired):
	n = two_n_plus_one // 2
	numerator = int(abs(desired * (2 * n + 1) - ((n + 1) * hot + n * cold)))
	denominator = 2 * n + 1
	return pos_rational(numerator, denominator)
testcases = int(input())
answers = []
for _ in range(testcases):
	(hot, cold, desired_temp) = [int(i) for i in input().split()]
	mid_way = (hot + cold) / 2
	if hot == cold:
		answers.append(1)
	elif desired_temp >= hot:
		answers.append(1)
	elif desired_temp <= mid_way:
		answers.append(2)
	else:
		frac = (hot - desired_temp) / (desired_temp - mid_way)
		frac /= 2
		option1 = 2 * int(frac) + 1
		option2 = option1 + 2
		(l1, l2) = (loss(option1, hot, cold, desired_temp), loss(option2, hot, cold, desired_temp))
		if min(l1, l2) >= pos_rational(hot - desired_temp, 1) and hot - desired_temp <= desired_temp - mid_way:
			answers.append(1)
		elif min(l1, l2) >= pos_rational(desired_temp - mid_way, 1):
			answers.append(2)
		elif l1 <= l2:
			answers.append(option1)
		else:
			answers.append(option2)
print(*answers, sep='\n')


from decimal import Decimal
import sys
input = sys.stdin.readline
print = sys.stdout.writelines
t = int(input())
for i in range(t):
	(h, c, t) = map(int, input().split())
	avg = (h + c) / 2
	if t <= avg:
		k = 2
	if t > avg:
		k = int((h - avg) // (t - avg))
		if k % 2 == 0:
			k += 1
		ans = k
		mn = 10 ** 7
		for j in range(-2, 3, 2):
			an = k + j
			if abs(Decimal(abs(an - 1) * avg + h) / Decimal(abs(an)) - t) < mn and an > 0:
				mn = abs(Decimal(abs(an - 1) * avg + h) / Decimal(abs(an)) - t)
				ans = an
		k = int(ans)
	print(str(k))
	print('\n')


import sys
import os.path
import math
if os.path.isfile('in.txt'):
	sys.stdin = open('in.txt', 'r', encoding='utf-8')
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if t >= h:
		print(1)
	elif t < h and 2 * t > h + c:
		temp = (t - h) / (h + c - 2 * t)
		n1 = math.floor(temp)
		n2 = math.ceil(temp)
		gap11 = abs((n1 + 1) * h + n1 * c - (2 * n1 + 1) * t)
		gap12 = 2 * n1 + 1
		gap21 = abs((n2 + 1) * h + n2 * c - (2 * n2 + 1) * t)
		gap22 = 2 * n2 + 1
		if gap11 * gap22 <= gap12 * gap21:
			print(2 * n1 + 1)
		else:
			print(2 * n2 + 1)
	else:
		print(2)


import sys
[t] = [int(i) for i in sys.stdin.readline().split()]
for _ in range(t):
	[h, c, t] = [int(i) for i in sys.stdin.readline().split()]
	h -= c
	t -= c
	if 2 * t <= h:
		print(2)
	else:
		k1 = t // (2 * t - h)
		k2 = k1 + 1
		t1 = h * k1 * (2 * k2 - 1)
		diff1 = abs(t * (2 * k1 - 1) * (2 * k2 - 1) - t1)
		t2 = h * k2 * (2 * k1 - 1)
		diff2 = abs(t * (2 * k1 - 1) * (2 * k2 - 1) - t2)
		if diff1 <= diff2:
			print(2 * k1 - 1)
		else:
			print(2 * k2 - 1)


test = int(input())
while test > 0:
	test -= 1
	(ht, cd, t) = map(int, input().split())
	if 2 * t <= ht + cd:
		print(2)
		continue
	ag = (ht - t) // (2 * t - ht - cd)
	if abs((2 * ag + 3) * t - ag * ht - 2 * ht - ag * cd - cd) * (2 * ag + 1) < abs((2 * ag + 1) * t - ag * ht - ht - ag * cd) * (2 * ag + 3):
		print(2 * ag + 3)
	else:
		print(2 * ag + 1)


import fractions
for _ in range(int(input())):
	(h, c, t) = list(map(int, input().split()))
	if h - t >= t - c:
		print(2)
	else:
		mind = abs(t - h)
		ans = 1
		tavg = (h + c + 1) // 2
		if abs(t - tavg) < mind:
			ans = 2
		l = 1
		r = 10 ** 9
		F = fractions.Fraction
		while l <= r:
			m = (l + r) // 2
			num = 2 * m + 1
			temp = F((num + 1) * h + (num - 1) * c, 2 * num)
			z = abs(t - temp)
			if z < mind:
				mind = z
				ans = 2 * m + 1
			if temp > t:
				l = m + 1
			else:
				r = m - 1
		print(ans)


t = int(input())
for test in range(t):
	(h, c, t) = map(int, input().split(' '))
	t -= c
	h -= c
	if t <= h / 2:
		print(2)
	else:
		res = int(h / (2 * t - h) / 2)
		if abs(t - (res + 1) * h / (2 * res + 1)) > abs(t - (res + 2) * h / (2 * res + 3)):
			print(2 * res + 3)
		else:
			print(2 * res + 1)


import math
from decimal import Decimal as d

def calcT(th, tc, n):
	return (d(tc * n) + (n + 1) * th) / (2 * n + 1)

def main(th, tc, t):
	if (th + tc) / 2 >= t:
		return 2
	else:
		n = (t - th) / (tc + th - 2 * t)
		if abs(t - calcT(th, tc, math.ceil(n))) < abs(t - calcT(th, tc, math.floor(n))):
			return math.ceil(n) * 2 + 1
		return math.floor(n) * 2 + 1
for _ in range(int(input())):
	(th, tc, t) = [int(i) for i in input().split()]
	print(main(th, tc, t))


from sys import stdin

def run(h, c, t):
	if h + c - 2 * t >= 0:
		return 2
	a = h - t
	b = 2 * t - h - c
	k = int(a / b)
	val1 = abs((k + 1) * h + k * c - (2 * k + 1) * t)
	val2 = abs((k + 2) * h + (k + 1) * c - (2 * k + 3) * t)
	if val1 * (2 * k + 3) <= val2 * (2 * k + 1):
		ans = 2 * k + 1
	else:
		ans = 2 * k + 3
	return ans

def main():
	cases = int(stdin.readline())
	for _ in range(cases):
		(h, c, t) = [int(x) for x in stdin.readline().split()]
		ans = run(h, c, t)
		print(ans)
import os
if os.path.exists('tmp.in'):
	stdin = open('tmp.in')
main()


import bisect
import heapq
import math
import collections
import sys
import copy
from functools import reduce
import decimal
from io import BytesIO, IOBase
import os
import itertools
sys.setrecursionlimit(10 ** 9)
decimal.getcontext().rounding = decimal.ROUND_HALF_UP
graphDict = collections.defaultdict
queue = collections.deque

class Graphs:

	def __init__(self):
		self.graph = graphDict(set)

	def add_edge(self, u, v):
		self.graph[u].add(v)
		self.graph[v].add(u)

	def delEdge(self, u, v):
		for ii in range(len(self.graph[u])):
			if self.graph[u][ii] == v:
				self[u].remove(v)
				break
		for ii in range(len(self[v])):
			if self[v][ii] == u:
				self[v].pop(i)
				break

	def dfs_utility(self, nodes, visited_nodes):
		visited_nodes.add(nodes)
		for neighbour in self.graph[nodes]:
			if neighbour not in visited_nodes:
				self.dfs_utility(neighbour, visited_nodes)

	def dfs(self):
		count = 0
		ans = []
		Visited = set()
		for i in range(1, n + 1):
			if i not in Visited:
				count += 1
				ans.append(i)
				self.dfs_utility(i, Visited)
		return (count, ans)

	def bfs(self, node):
		visited = set()
		if node not in visited:
			queue.append(node)
			visited.add(node)
		while queue:
			parent = queue.popleft()
			print(parent)
			for item in self.graph[parent]:
				if item not in visited:
					queue.append(item)
					visited.add(item)

class Tree:

	def __init__(self, data):
		self.data = data
		self.left = None
		self.right = None

def inorder(node, lis):
	if node:
		inorder(node.left, lis)
		lis.append(node.data)
		inorder(node.right, lis)
	return lis

def leaf_node_sum(root):
	if root is None:
		return 0
	if root.left is None and root.right is None:
		return root.data
	return leaf_node_sum(root.left) + leaf_node_sum(root.right)

def hight(root):
	if root is None:
		return -1
	if root.left is None and root.right is None:
		return 0
	return max(hight(root.left), hight(root.right)) + 1

def rounding(n):
	return int(decimal.Decimal(f'{n}').to_integral_value())

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, **kwargs):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def inp():
	return sys.stdin.readline().strip()

def map_inp(v_type):
	return map(v_type, inp().split())

def list_inp(v_type):
	return list(map_inp(v_type))
for _ in range(int(inp())):
	(h, c, t) = map_inp(int)
	if (h + c) / 2 == t:
		print(2)
	else:
		temp = (t - h) // (h + c - 2 * t)
		if temp < 0:
			print(2)
		else:
			ans = []
			for i in range(temp, temp + 3):
				for j in range(temp, temp + 3):
					if i + j == 0:
						continue
					if i < j:
						continue
					else:
						ans.append([abs(t - decimal.Decimal(i * h + j * c) / (i + j)), i, j])
			ans.sort()
			print(ans[0][1] + ans[0][2])


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
from fractions import Fraction
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def oddVal(i, h, c):
	if i == 1:
		return Fraction(h, 1)
	else:
		return Fraction((i // 2 + 1) * h + i // 2 * c, i)

def compare(a, b, t):
	if abs(t - a) < abs(t - b):
		return 0
	elif abs(t - a) == abs(t - b):
		return 1
	return 2

def main():
	T = int(input())
	for _ in range(T):
		(h, c, t) = map(int, input().split())
		(l, r) = (1, 10 ** 7)
		closest = Fraction(h, 1)
		result = 1
		tFraction = Fraction(t, 1)
		if abs(t - (h + c) / 2) < abs(t - closest):
			closest = Fraction(h + c, 2)
			result = 2
		while l <= r:
			mid = (l + r) // 2
			if mid % 2 == 0:
				mid -= 1
			curTemp = oddVal(mid, h, c)
			compareResult = compare(closest, curTemp, tFraction)
			if compareResult == 1 and mid < result:
				closest = curTemp
				result = mid
			elif compareResult == 2:
				closest = curTemp
				result = mid
			if curTemp <= t:
				r = mid - 2
			else:
				l = mid + 2
		print(result)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import sys
from collections import defaultdict, deque

def input():
	return sys.stdin.readline()[:-1]
from fractions import Fraction as F

def f(h, c, m, t):
	return h * (m + 1) + c * m

def solve():
	(h, c, t) = [int(x) for x in input().split()]
	if h + c >= t * 2:
		print(2)
		return
	delta = F(abs(t - h))
	ans = 1
	l = 0
	r = 10 ** 18
	while l + 1 < r:
		m = (l + r) // 2
		if f(h, c, m, t) > t * (2 * m + 1):
			l = m
		else:
			r = m
	for l in range(l, r + 3):
		if abs(F(t) - F(f(h, c, l, t), 2 * l + 1)) < delta:
			delta = abs(F(t) - F(f(h, c, l, t), 2 * l + 1))
			ans = 2 * l + 1
	print(ans)
t = 1
t = int(input())
for case in range(1, t + 1):
	ans = solve()


q = int(input())
for _ in range(q):
	(h, c, t) = map(int, input().split())
	if 2 * t <= h + c:
		print(2)
		continue
	l = 1
	r = 10 ** 20
	while r - l > 1:
		m = (r + l) // 2
		if m * h + (m - 1) * c >= t * (2 * m - 1):
			l = m
		else:
			r = m
	a = l
	b = l + 1
	m = b * h + c * (b - 1)
	z = a * h + c * (a - 1)
	x = (2 * a - 1) * (2 * b - 1)
	if (2 * b - 1) * z - t * x <= t * x - (2 * a - 1) * m:
		print(2 * a - 1)
	else:
		print(2 * b - 1)


for i in range(int(input())):
	(h, c, t) = map(int, input().split())
	if (h + c) / 2 >= t:
		print(2)
	else:
		k = (h - t) // (2 * t - h - c)
		x = abs(k * (h + c) + h - t * (2 * k + 1)) * (2 * k + 3)
		y = abs((k + 1) * (h + c) + h - t * (2 * k + 3)) * (2 * k + 1)
		if y >= x:
			print(2 * k + 1)
		else:
			print(2 * k + 3)


import math
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if 2 * t <= h + c:
		print(2)
		continue
	if t >= h:
		print(1)
		continue
	n = int((h - t) / (2 * t - h - c))
	t1 = abs((h + c) * n + h - t * (2 * n + 1)) * (2 * n + 3)
	t2 = abs((h + c) * (n + 1) + h - t * (2 * n + 3)) * (2 * n + 1)
	if t1 <= t2:
		print(2 * n + 1)
	else:
		print(2 * n + 3)


import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines
ns = lambda : readline().rstrip()
ni = lambda : int(readline().rstrip())
nm = lambda : map(int, readline().split())
nl = lambda : list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

class Q:

	def __init__(self, p, q=1):
		if q == 0:
			raise ZeroDivisionError
		self.p = p
		self.q = q
		self.reduce()

	def __repr__(self):
		return '{}/{}'.format(self.p, self.q)

	def __eq__(self, other):
		if type(other) == int:
			return self.p == self.q * other
		else:
			return self.p * other.q == self.q * other.p

	def __ne__(self, other):
		if type(other) == int:
			return self.p != self.q * other
		else:
			return self.p * other.q != self.q * other.p

	def __lt__(self, other):
		if type(other) == int:
			return self.p < self.q * other
		else:
			return self.p * other.q < self.q * other.p

	def __le__(self, other):
		if type(other) == int:
			return self.p <= self.q * other
		else:
			return self.p * other.q <= self.q * other.p

	def __gt__(self, other):
		if type(other) == int:
			return self.p > self.q * other
		else:
			return self.p * other.q > self.q * other.p

	def __ge__(self, other):
		if type(other) == int:
			return self.p >= self.q * other
		else:
			return self.p * other.q >= self.q * other.p

	def __neg__(self):
		return Q(-self.p, self.q)

	def __invert__(self):
		return Q(self.q, self.p)

	def __hash__(self):
		if self.q == 1:
			return hash(self.p)
		else:
			return hash((self.p, self.q))

	def __abs__(self):
		return Q(abs(self.p), abs(self.q))

	def __add__(self, other):
		if type(other) is int:
			return Q(self.p + other * self.q, self.q)
		else:
			return Q(self.p * other.q + self.q * other.p, self.q * other.q)

	def __radd__(self, other):
		return self + other

	def __iadd__(self, other):
		if type(other) is int:
			self.p += other * self.q
		else:
			self.p = self.p * other.q + self.q * other.p
			self.q *= other.q
		self.reduce()
		return self

	def __sub__(self, other):
		return self + -other

	def __rsub__(self, other):
		return other + -self

	def __isub__(self, other):
		self += -other
		return self

	def __mul__(self, other):
		if type(other) is int:
			return Q(self.p * other, self.q)
		else:
			return Q(self.p * other.p, self.q * other.q)

	def __rmul__(self, other):
		return self * other

	def __imul__(self, other):
		if type(other) is int:
			self.p *= other
		else:
			self.p *= other.p
			self.q *= other.q
		self.reduce()
		return self

	def __truediv__(self, other):
		if type(other) is int:
			return Q(self.p, self.q * other)
		else:
			return Q(self.p * other.q, self.q * other.p)

	def __rtruediv__(self, other):
		if type(other) is int:
			return Q(other * self.q, self.p)
		else:
			return Q(other.p * self.q, other.q * self.p)

	def __itruediv__(self, other):
		if type(other) is int:
			self.q *= other
		else:
			self.p *= other.q
			self.q *= other.p
		self.reduce()
		return self

	def __floordiv__(self, other):
		if type(other) is int:
			return self.p // (self.q * other)
		else:
			return self.p * other.q // (self.q * other.p)

	def __rfloordiv__(self, other):
		if type(other) is int:
			return other * self.q // self.p
		else:
			return other.p * self.q // (other.q * self.p)

	def __ifloordiv__(self, other):
		if type(other) is int:
			self.p //= self.q * other
		else:
			self.p = self.p * other.q // (self.q * other.p)
		self.q = 1
		return self

	def __mod__(self, other):
		return self - self // other * other

	def __rmod__(self, other):
		return other - other // self * self

	def __imod__(self, other):
		self -= self // other * other
		self.reduce()
		return self

	def __pow__(self, other):
		if type(other) is not int:
			raise EnvironmentError
		return Q(self.p ** other, self.q ** other)

	def __ipow__(self, other):
		if type(other) is not int:
			raise TypeError
		self.p **= other
		self.q **= other
		return self

	def GCD(self):
		(a, b) = (abs(self.p), abs(self.q))
		while b > 0:
			(a, b) = (b, a % b)
		return a

	def reduce(self):
		r = self.GCD()
		self.p //= r
		self.q //= r
		if self.q < 0:
			self.p *= -1
			self.q *= -1
		return self

	def floor(self):
		return self.p // self.q

	def to_decimal(self):
		return self.p / self.q

	def inverse(self):
		return Q(self.q, self.p)

def calc(x, t, h, c):
	return abs(t - (x * h + (x - 1) * c) / (x * 2 - 1))

def solve():
	(h, c, t) = nm()
	if t * 2 <= h + c:
		print(2)
		return
	x = (t - c) // (2 * t - h - c)
	(h, c, t) = (Q(h), Q(c), Q(t))
	cmax = abs(t - (h + c) / 2)
	cidx = -1
	for i in (x + 1, x):
		cn = calc(i, t, h, c)
		if cmax >= cn:
			cmax = cn
			cidx = i
	print(cidx * 2 - 1 if cidx >= 0 else 2)
	return
T = ni()
for _ in range(T):
	solve()


temp1 = int(input())
while temp1 > 0:
	temp1 -= 1
	(hot, cold, t) = map(int, input().split())
	if 2 * t <= hot + cold:
		print(2)
		continue
	avg = (hot - t) // (2 * t - hot - cold)
	if abs((2 * avg + 3) * t - avg * hot - 2 * hot - avg * cold - cold) * (2 * avg + 1) < abs((2 * avg + 1) * t - avg * hot - hot - avg * cold) * (2 * avg + 3):
		print(2 * avg + 3)
	else:
		print(2 * avg + 1)


import math
from decimal import *
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if t <= (h + c) / 2:
		print(2)
	else:
		n = math.ceil((h - c) / (2 * t - (h + c)))
		if n & 1:
			print(n)
		else:
			half = n // 2
			getcontext().prec = 1000
			a1 = Decimal(half * h + (half - 1) * c) / Decimal(n - 1)
			a2 = Decimal((half + 1) * h + half * c) / Decimal(n + 1)
			a1 = abs(a1 - t)
			a2 = abs(a2 - t)
			if a1 <= a2:
				print(n - 1)
			else:
				print(n + 1)


from fractions import Fraction as f
import sys
t = int(input())
for _ in range(t):
	(h, c, t) = [int(x) for x in input().split()]
	if h == t:
		print(1)
		continue
	x = (h + c) / 2
	if x == t:
		print(2)
		continue
	ans = abs(f(h + c, 2) - t)
	ans2 = 2
	if abs(h - t) <= ans:
		ans2 = 1
	y = (t - h) / (h + c - 2 * t)
	y = int(y)
	for j in range(max(0, y - 5), y + 5 + 1):
		k = f(j * (h + c) + h, 2 * j + 1)
		if abs(k - t) < ans:
			ans = abs(k - t)
			ans2 = 2 * j + 1
	print(ans2)


def solve(h, c, t):
	if t >= h:
		return 1
	if 2 * t <= h + c:
		return 2
	if (h - t) % (2 * t - h - c) == 0:
		return 2 * (h - t) // (2 * t - h - c) + 1
	nn1 = int((h - t) / (2 * t - h - c))
	nn2 = nn1 + 1
	if (t * (2 * nn2 + 1) - nn2 * (h + c) - h) * (2 * nn1 + 1) - (nn1 * (h + c) + h - t * (2 * nn1 + 1)) * (2 * nn2 + 1) < 0:
		return 2 * nn2 + 1
	return 2 * nn1 + 1
t = int(input())
for i_t in range(t):
	[h, c, tt] = list(map(int, input().split(' ')))
	print(solve(h, c, tt))


def inp():
	return int(input())
import math

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
import bisect
T = inp()

def odds(num):
	high = math.ceil(num)
	low = math.ceil(num)
	if low % 2 == 0:
		low -= 1
	if high % 2 == 0:
		high += 1
	return (low, high)
	pass

def solve(H, C, t):
	even_avg = (H + C) / 2
	val1 = (H - C) / 2
	val2 = t - even_avg
	if val2 == 0:
		return 2
	odd_position = val1 / val2
	if odd_position < 1:
		if H < even_avg:
			return 1
		else:
			return 2
	(low, high) = odds(odd_position)
	difference = abs(t - even_avg)
	if low > 400000:
		return high
	number = 2
	for i in [low, high]:
		item1 = (i + 1) // 2 * H
		item2 = i // 2 * C
		avg = float((item1 + item2) / i)
		diff = abs(t - avg)
		if diff < difference:
			difference = diff
			number = i
		pass
	return number
for i in range(T):
	(H, C, t) = inlt()
	print(solve(H, C, t))


import sys
input = sys.stdin.buffer.readline
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if h <= t:
		print(1)
	elif (h + c) // 2 >= t:
		print(2)
	else:
		n_c = (h - t) // (2 * t - h - c)
		n_h = n_c + 1
		if abs(n_c * c + n_h * h - t * (n_c + n_h)) * (n_c + n_h + 2) > abs(n_c * c + n_h * h + h + c - t * (n_c + n_h + 2)) * (n_c + n_h):
			print(n_c + n_h + 2)
		else:
			print(n_c + n_h)


def temp(h, c, n):
	return (h * (n + 1) + c * n, 2 * n + 1)
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if t * 2 <= h + c:
		print(2)
		continue
	n = (h - t) // (2 * t - h - c)
	n1 = n + 1
	(a, b) = temp(h, c, n)
	(a1, b1) = temp(h, c, n1)
	(d, dn) = (abs(a - b * t), b)
	(d1, dn1) = (abs(a1 - b1 * t), b1)
	if d * dn1 > d1 * dn:
		ans = n1
	else:
		ans = n
	print(2 * ans + 1)


inp = lambda cast=int: [cast(x) for x in input().split()]
printf = lambda s='', *args, **kwargs: print(str(s).format(*args), flush=True, **kwargs)
(t,) = inp()
for _ in range(t):
	(h, c, t) = inp()
	if 2 * t <= h + c:
		print(2)
	else:
		x = (t - c) // (2 * t - h - c)
		y = x + 1
		res1 = (x * h + (x - 1) * c) * (2 * y - 1) - t * (2 * x - 1) * (2 * y - 1)
		res2 = t * (2 * x - 1) * (2 * y - 1) - (y * h + (y - 1) * c) * (2 * x - 1)
		if res1 <= res2:
			print(2 * x - 1)
		else:
			print(2 * y - 1)


from sys import stdin
for _ in range(int(stdin.readline())):
	(h, c, t) = map(int, stdin.readline().split())
	if t >= h:
		print(1)
		continue
	if t <= (h + c) / 2:
		print(2)
		continue
	n = 1 / (1 - 2 * ((h - t) / (h - c)))
	x = round(n)
	if x % 2 == 0:
		y = x - 1
		ex = 2 * t * y * (y + 2) - 2 * ((y // 2 + 1) * h + y // 2 * c) * (y + 1) - (h + c) * y
		if ex < 0:
			print(y + 2)
		else:
			print(y)
	else:
		print(x)


T = int(input())
C = []
for i in range(0, T):
	(h, c, t) = [int(x) for x in input().split(' ')]
	if h + c == 2 * t:
		C.append(2)
	elif 2 * t < h + c:
		if abs((h + c) / 2 - t) < abs(h - t):
			C.append(2)
		else:
			C.append(1)
	else:
		m = (h - t) // (2 * t - h - c)
		if abs(((m + 2) * h + (m + 1) * c) * (2 * m + 1) - t * (2 * m + 1) * (2 * m + 3)) >= abs(((m + 1) * h + m * c) * (2 * m + 3) - t * (2 * m + 3) * (2 * m + 1)):
			C.append(2 * m + 1)
		else:
			C.append(2 * m + 3)
for i in C:
	print(i)


def getClosest(h, c, st, en, t):
	if abs(val(h, c, st, t) / (2 * st - 1)) <= abs(val(h, c, en, t) / (2 * en - 1)):
		return st
	else:
		return en

def val(h, c, x, t):
	return x * h + (x - 1) * c - (2 * x - 1) * t

def findClosest(h, c, st, en, t):
	if val(h, c, st, t) <= 0:
		return st
	if val(h, c, en, t) >= 0:
		return en
	i = st
	j = en
	mid = 0
	while i < j:
		mid = (i + j) // 2
		if val(h, c, mid, t) == 0:
			return mid
		if val(h, c, mid, t) < 0:
			if mid > st and val(h, c, mid - 1, t) > 0:
				return getClosest(h, c, mid - 1, mid, t)
			j = mid
		else:
			if mid < en and val(h, c, mid + 1, t) < 0:
				return getClosest(h, c, mid, mid + 1, t)
			i = mid + 1
	return mid
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if 2 * t <= h + c:
		print(2)
	elif t == h:
		print(1)
	else:
		x = 1
		while x * h + (x - 1) * c > (2 * x - 1) * t:
			x = x << 1
		st = x >> 1
		st = st - 1
		en = x + 2
		cx = findClosest(h, c, st, en, t)
		print(2 * cx - 1)


import os
import sys
from io import BytesIO, IOBase
from collections import defaultdict as dd

def main():
	for _ in range(int(input())):
		(h, c, t) = map(int, input().split())
		if t <= (h + c) / 2:
			print(2)
		else:
			n = (c - t) // (h + c - 2 * t)
			if abs(n * (h + c) - c - t * (2 * n - 1)) * (2 * n + 1) > abs((n + 1) * (h + c) - c - t * (2 * n + 1)) * (2 * n - 1):
				print(2 * n + 1)
			else:
				print(2 * n - 1)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


from decimal import *
getcontext().prec = 18
for t in range(int(input())):
	(n, m, k) = map(int, input().split())
	l = 1
	r = 10 ** 9
	while r - l > 3:
		mid = (r + l) // 2
		if mid % 2 == 0:
			mid -= 1
		c = mid // 2 + 1
		chk = (c * n + (c - 1) * m) / mid
		if chk < k:
			r = mid
		else:
			l = mid
	chk = Decimal((l // 2 + 1) * n + l // 2 * m) / Decimal(l)
	chk1 = Decimal((r // 2 + 1) * n + r // 2 * m) / Decimal(r)
	if abs(chk - k) > abs(chk1 - k):
		ans = r
		chk = chk1
	else:
		ans = l
	chk1 = (n + m) / 2
	if abs(chk - k) > abs(chk1 - k):
		print(2)
	else:
		print(ans)


def solve():
	(h, c, t) = [int(x) for x in input().split()]
	if h == c:
		print(1)
	elif t >= h:
		print(1)
	elif 2 * t <= h + c:
		print(2)
	else:
		ans = (h - c) // (2 * t - h - c)
		if ans % 2 == 0:
			ans += 1
		variants = []
		variants.append(ans)
		variants.append(2)
		variants.append(1)
		if ans > 1:
			variants.append(ans - 2)
		variants.append(ans + 2)
		print(min(variants, key=lambda ans: abs(t - (h * (ans // 2 + ans % 2) + c * (ans // 2)) / ans)))
t = int(input())
for _ in range(t):
	solve()


from fractions import Fraction
T = int(input())

def solve(h, c, t):
	return Fraction(t - h, h + c - 2 * t)

def with_a(a, h, c):
	return Fraction((a + 1) * h + a * c, 2 * a + 1)

def closest(t, poss):
	best_delta = float('inf')
	best = None
	for (steps, p) in poss:
		if abs(t - p) < best_delta:
			best_delta = abs(t - p)
			best = steps
	return best
for case in range(T):
	(h, c, t) = map(int, input().split())
	poss = []
	poss.append((1, h))
	avg = Fraction(h + c, 2)
	poss.append((2, avg))
	try:
		x = solve(h, c, t)
	except ZeroDivisionError:
		pass
	else:
		w = int(x) - 5
		for a in range(w, w + 10):
			if a <= 0:
				continue
			poss.append((2 * a + 1, with_a(a, h, c)))
	poss.sort(key=lambda k: k[0])
	print(closest(t, poss))


T = int(input())
for i in range(T):
	(h, c, t) = map(int, input().split())
	avg = (h + c) / 2
	if avg >= t:
		print(2)
	else:
		n = ((h - c) / (2 * (t - avg)) + 1) / 2
		if type(n) == int:
			print(2 * n - 1)
		else:
			n_min = int(n)
			n_max = n_min + 1
			diff_n_min = abs(t - avg - (h - c) / (2 * (2 * n_min - 1)))
			diff_n_max = abs(t - avg - (h - c) / (2 * (2 * n_max - 1)))
			if diff_n_min <= diff_n_max:
				print(2 * n_min - 1)
			else:
				print(2 * n_max - 1)


for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if t <= (h + c) / 2:
		print(2)
	else:
		x = (h - t) // (2 * t - h - c)
		v1 = (x + 1) * h + x * c
		v2 = (x + 2) * h + (x + 1) * c
		if abs(v1 - (2 * x + 1) * t) / (2 * x + 1) <= abs(t * (2 * x + 3) - v2) / (2 * x + 3):
			print(2 * x + 1)
		else:
			print(2 * x + 3)


import sys
input = sys.stdin.readline
import bisect
test = int(input())
for _ in range(test):
	(h, c, t) = map(int, input().split())
	if t * 2 <= h + c:
		print(2)
		continue
	l = 0
	r = 100000000
	while l + 1 < r:
		x = (l + r) // 2
		if h * (x + 1) + c * x < t * (2 * x + 1):
			r = x
		else:
			l = x
	if abs(t * (2 * l + 1) * (2 * r + 1) - (h * (l + 1) + c * l) * (2 * r + 1)) <= abs(t * (2 * l + 1) * (2 * r + 1) - (h * (r + 1) + c * r) * (2 * l + 1)):
		print(2 * l + 1)
	else:
		print(2 * r + 1)


import math
t = int(input())
for _ in range(t):
	(h, c, t) = map(int, input().split())
	t3 = (h + c) / 2
	if t == c or 2 * t <= h + c:
		print(2)
	elif t == h:
		print(1)
	elif t3 == t:
		print(2)
	else:
		x1 = int((h - t) / (2 * t - h - c))
		x2 = x1 + 1
		if abs(x1 * (h + c) + h - (2 * x1 + 1) * t) * (2 * x2 + 1) <= abs(x2 * (h + c) + h - (2 * x2 + 1) * t) * (2 * x1 + 1):
			print(2 * x1 + 1)
		else:
			print(2 * x2 + 1)


for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	h -= c
	t -= c
	if h == t:
		print(1)
	elif h / 2 >= t:
		print(2)
	else:

		def p(a):
			return h * (1 + a)

		def q(a):
			return 1 + 2 * a
		a = 0
		b = 10 ** 10
		while a + 1 != b:
			mid = (a + b) // 2
			val = p(mid)
			T = t * q(mid)
			if val == T:
				print(1 + 2 * mid)
				break
			if val < T:
				b = mid
			else:
				a = mid
		if val != T:
			if 2 * t * q(a) * q(b) >= p(a) * q(b) + p(b) * q(a):
				print(1 + 2 * a)
			else:
				print(1 + 2 * b)


import math
num_cases = int(input())
for _ in range(num_cases):
	li = input().strip().split()
	(h, c, t) = [int(i) for i in li]
	diff = abs((h + c) / 2 - t)
	if h == c:
		print(1)
	elif diff == 0:
		print(2)
	else:
		n = (t - c) / abs(h + c - 2 * t)
		n1 = max(1, int(n))
		n2 = max(1, math.ceil(n))
		diff1 = abs(((h + c - 2 * t) * n1 - c + t) / (2 * n1 - 1))
		diff2 = abs(((h + c - 2 * t) * n2 - c + t) / (2 * n2 - 1))
		if diff1 <= diff2 and diff1 <= diff:
			if diff1 == diff and n1 > 1:
				print(2)
			else:
				print(2 * n1 - 1)
		elif diff2 < diff:
			print(2 * n2 - 1)
		else:
			print(2)


def N():
	return int(input())

def NM():
	return map(int, input().split())

def L():
	return list(NM())

def LN(n):
	return [N() for i in range(n)]

def LL(n):
	return [L() for i in range(n)]
T = N()

def f():
	(h, c, t) = NM()
	h -= c
	t -= c
	if h == t:
		print(1)
		return
	elif t * 2 <= h:
		print(2)
		return
	lo = 0
	hi = 10 ** 6 * 2
	while hi >= lo:
		mi = (hi + lo) // 2
		if sa(mi, t, h) > sa(mi + 1, t, h):
			lo = mi + 1
		else:
			hi = mi - 1
	if sa(lo, t, h) <= sa(lo + 1, t, h):
		print(lo * 2 + 1)
	else:
		print((lo + 1) * 2 + 1)
	return

def sa(k, t, h):
	return abs((h * (k + 1) - t * (2 * k + 1)) / ((2 * k + 1) * h))
for i in range(T):
	f()


import math
t = int(input())
for w in range(t):
	(h, c, te) = (int(i) for i in input().split())
	d2 = (h + c) / 2
	if h < te:
		print(1)
	elif d2 >= te:
		print(2)
	else:
		d = pow(10, 18)
		x = (te - c) / (2 * te - h - c)
		k1 = max(1, int(x - 10))
		k2 = int(x + 10)
		for i in range(k1, k2):
			if abs(te * (2 * i - 1) - (h * i + c * (i - 1))) / (2 * i - 1) < d:
				d = abs(te * (2 * i - 1) - (h * i + c * (i - 1))) / (2 * i - 1)
				n = 2 * i - 1
		print(n)


import sys
sys.setrecursionlimit(10 ** 5)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.readline())

def MI():
	return map(int, sys.stdin.readline().split())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def SI():
	return sys.stdin.readline()[:-1]

def main():
	for _ in range(II()):
		(h, c, t) = MI()
		if t >= h:
			print(1)
			continue
		if t * 2 <= c + h:
			print(2)
			continue
		a1 = (-t + h) // (-h - c + 2 * t)
		a2 = a1 + 1
		if 2 * t * (2 * a2 + 1) * (2 * a1 + 1) - (h * (a2 + 1) + c * a2) * (2 * a1 + 1) < (2 * a2 + 1) * (h * (a1 + 1) + c * a1):
			ans = a2 * 2 + 1
		else:
			ans = a1 * 2 + 1
		print(ans)
main()


import sys
input = sys.stdin.readline
INF = 10 ** 13
Q = int(input())
Query = [list(map(int, input().split())) for _ in range(Q)]
for (h, c, t) in Query:
	if 2 * t <= h + c:
		ans = 2
	else:
		l = 0
		r = INF
		while r - l > 1:
			m = (l + r) // 2
			if (h + c) * m + h > (2 * m + 1) * t:
				l = m
			else:
				r = m
		if 2 * t * (2 * r + 1) * (2 * l + 1) - ((h + c) * r + h) * (2 * l + 1) >= ((h + c) * l + h) * (2 * r + 1):
			ans = 2 * l + 1
		else:
			ans = 2 * r + 1
	print(ans)


T = int(input())
import math
for _ in range(T):
	(h, c, t) = map(int, input().split())
	ans = 1145141919810
	av = (h + c) / 2
	if av >= t:
		print(2)
	elif t == h:
		print(1)
	else:
		an = h - av
		bn = t - av
		x = math.ceil(an / bn)
		aa = x // 2 * 2 + 1
		bb = x // 2 * 2 - 1
		ta = an / aa
		tb = an / bb
		tc = t - av
		if abs(ta - tc) >= abs(tb - tc):
			print(bb)
		else:
			print(aa)


def read_int():
	return int(input())

def read_ints():
	return list(map(int, input().split(' ')))
tt = read_int()
for case_num in range(tt):
	(h, c, t) = read_ints()
	if 2 * t <= h + c:
		print(2)
		continue
	l = 1
	r = int(10000000.0)

	def calc(x):
		return x * h + (x - 1) * c
	while l <= r:
		mid = (l + r) // 2
		temp = calc(mid)
		if temp >= t * (2 * mid - 1):
			l = mid + 1
		else:
			r = mid - 1
	a = calc(l - 1)
	b = calc(l)
	p = 2 * l - 3
	q = 2 * l - 1
	if abs(a * q - t * p * q) <= abs(b * p - t * p * q):
		print(p)
	else:
		print(q)


from collections import Counter, defaultdict, deque
from math import *
import sys
input = sys.stdin.readline

def solve():
	(h, c, t) = [int(x) for x in input().split()]
	avg = (h + c) / 2
	if avg >= t:
		print(2)
		return
	d = t - avg
	n1 = floor((h - avg) / d)
	if n1 % 2 == 0:
		n1 -= 1
	n2 = n1 + 2
	a1 = d - (h - avg) / n1
	a2 = d - (h - avg) / n2
	if abs(a1) <= abs(a2):
		print(n1)
	else:
		print(n2)
tt = int(input())
for test in range(tt):
	solve()


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	mid = (a + b) / 2
	if c == a:
		print(1)
	elif c <= mid:
		print(2)
	elif c >= mid + (a - b) / 6 and c < a:
		d = mid + (a - b) / 6
		if abs(d - c) < abs(a - c):
			print(3)
		else:
			print(1)
	else:
		c -= mid
		d = []
		x = (a - b) // c
		for i in range(int(x) - 4, int(x) + 5):
			if i % 2 == 0 and i // 2 % 2 != 0:
				d.append([abs((a - b) / i - c), i])
		d.sort()
		print(d[0][1] // 2)


def i_by_t(h, c, t):
	return ((h - c) / (t - (h + c) / 2) + 2) / 2
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	mean = (h + c) / 2

	def temp(i):
		half = i // 2
		return (h * (i - i // 2) + c * half) / i
	T = temp(1)
	if t >= T:
		print(1)
		continue
	best_eps = abs(T - t)
	T = temp(2)
	if t <= T:
		print(2)
		continue
	best_i = int(i_by_t(h, c, t))
	if best_i % 2 == 0:
		best_i -= 1
	i = best_i
	best_i = 1
	while True:
		T = temp(i)
		eps = abs(T - t)
		if eps < best_eps:
			best_i = i
		if eps <= best_eps:
			best_eps = eps
		else:
			print(best_i)
			break
		i += 2


import math
from decimal import *
tt = int(input())
for t in range(tt):
	(x2, x1, x0) = input().split(' ')
	a1 = int(x1)
	a2 = int(x2)
	a0 = int(x0)
	if a0 <= (a1 + a2) / 2:
		print(2)
		continue
	ans1 = math.floor((a0 - a2) / (a1 + a2 - 2 * a0))
	ans2 = math.ceil((a0 - a2) / (a1 + a2 - 2 * a0))
	y1 = ((a1 + a2) * ans1 + a2) / Decimal(2 * ans1 + 1)
	y2 = ((a1 + a2) * ans2 + a2) / Decimal(2 * ans2 + 1)
	distance_ans1 = abs(y1 - a0)
	distance_ans2 = abs(y2 - a0)
	if distance_ans2 < distance_ans1:
		x = ans2
	else:
		x = ans1
	print(2 * x + 1)


def check(h, c, k, l, t):
	if l == -1:
		return abs(((k + 1) * h + k * c) / (2 * k + 1) - t)
	T = abs((k + 1) * h + k * c - t * (2 * k + 1)) * (2 * l + 1) - abs((l + 1) * h + l * c - t * (2 * l + 1)) * (2 * k + 1)
	return T

def solve(h, c, t):
	m1 = abs((h + c) // 2 - t)
	if t <= (h + c) // 2:
		return 2
	left = 0
	right = int((t - h) / (h + c - 2 * t)) + 2
	while left < right:
		mid = (left + right) // 2
		x = check(h, c, mid - 1, mid, t)
		y = check(h, c, mid, mid + 1, t)
		if x > 0 and y <= 0:
			left = mid
			right = mid
		elif 0 < y and x > 0:
			left = mid + 1
		else:
			right = mid - 1
	m2 = check(h, c, left, -1, t)
	if m1 == min(m1, m2):
		return 2
	else:
		return 2 * left + 1
test = 1
test = int(input())
for t in range(0, test):
	(h, c, t) = [int(x) for x in input().split()]
	print(solve(h, c, t))


t = int(input())
for i in range(0, t):
	s = input().split()
	h = int(s[0])
	c = int(s[1])
	t = int(s[2])
	if h + c == t * 2:
		print(2)
	else:
		x = (t - h) / (h + c - t * 2)
		l = int(x)
		r = l + 1
		al = abs(h * (l + 1) + c * l - t * (2 * l + 1)) * (2 * r + 1)
		ar = abs(h * (r + 1) + c * r - t * (2 * r + 1)) * (2 * l + 1)
		am = abs((h + c) / 2 - t) * (2 * l + 1) * (2 * r + 1)
		if min(al, ar, am) == al and x >= 0:
			print(2 * l + 1)
		elif min(al, ar, am) == ar and x >= 0:
			print(2 * r + 1)
		else:
			print(2)


from sys import stdin
import math
from decimal import *
from fractions import Fraction
getcontext().prec = 50
a = int(stdin.readline())
for b in range(0, a):
	A = stdin.readline().split()
	h = int(A[0])
	c = int(A[1])
	t = int(A[2])
	if c + h == 2 * t:
		print(2)
		continue
	if (h + c) / 2 > t:
		print(2)
		continue
	AA = 1 / 2 * (1 + (h - c) / 2 / (t - (h + c) / 2))
	S = int(math.floor(AA))
	T = int(math.ceil(AA))
	S = max(1, S)
	T = max(1, T)
	HH = abs(Fraction(S * (c + h) - c, 2 * S - 1) - t)
	II = abs(Fraction(T * (c + h) - c, 2 * T - 1) - t)
	JJ = abs((c + h) / 2 - t)
	KK = abs(h - t)
	final = min(HH, II, JJ, KK)
	if final == HH:
		print(2 * S - 1)
	elif final == II:
		print(2 * T - 1)
	elif final == JJ:
		print(2)
	else:
		print(1)


import sys
import math
import operator as op
from functools import reduce
from sys import maxsize
from decimal import *

def read_line():
	return sys.stdin.readline()[:-1]

def read_int():
	return int(sys.stdin.readline())

def read_int_line():
	return [int(v) for v in sys.stdin.readline().split()]

def read_float_line():
	return [float(v) for v in sys.stdin.readline().split()]

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer / denom

def nc2(n):
	return n * (n - 1) // 2
getcontext().prec = 64
t = read_int()
for i in range(t):
	(h, c, t) = read_int_line()
	if t == h:
		print(1)
		continue
	if 2 * t == h + c:
		print(2)
		continue
	x = (h - t) / (2 * t - h - c)
	if x < 0:
		print(2)
		continue
	if x == int(x):
		print(int(2 * x + 1))
	else:
		x = int(x)
		v1 = Decimal((2 * x + 3) * abs(x * (h + c) + h - t * (2 * x + 1)))
		v2 = Decimal((2 * x + 1) * abs((x + 1) * (h + c) + h - t * (2 * x + 3)))
		if v1 <= v2:
			ans = 2 * x + 1
		else:
			ans = 2 * x + 3
		print(ans)


import math
import sys
testc = int(input())

def diff(h, t, c, n):
	n = float(n)
	curt = round((n * h + (n - 1) * c) / (2 * n - 1), 20)
	return curt
for i in range(testc):
	l = input().split()
	h = float(l[0])
	c = float(l[1])
	t = float(l[2])
	if h == t:
		print(1)
	elif (h + c) / 2.0 >= t:
		print(2)
	else:
		n = (t - c) / (2 * t - h - c)
		n1 = math.floor(n)
		n2 = math.ceil(n)
		a1 = n1 * h + (n1 - 1) * c
		b1 = 2 * n1 - 1
		a2 = n2 * h + (n2 - 1) * c
		b2 = 2 * n2 - 1
		if (t * b1 - a1) * b2 < (a2 - t * b2) * b1:
			ans = n2
		else:
			ans = n1
		print(2 * ans - 1)


from fractions import Fraction
from sys import exit
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if t >= h:
		print(1)
		continue
	sr = Fraction(h + c, 2)
	if t <= sr:
		print(2)
		continue
	p = Fraction(t - h, h + c - 2 * t)
	aa = None
	pans = -1
	kek = int(p)
	for pp in range(max(0, kek - 3), max(1, kek + 3)):
		a = Fraction(pp * (h + c) + h, 2 * pp + 1)
		if aa is None or abs(a - t) < abs(aa - t):
			pans = pp
			aa = a
	print(2 * pans + 1)


import math

def process_test_case(i_t):
	(h, c, t) = map(int, input().split())
	if 2 * t <= h + c:
		print(2)
		return None
	if t == h:
		print(1)
		return None
	t -= 0.5 * (h + c)
	n1 = math.ceil(((h - c) / t - 2) / 4)
	n2 = n1 - 1
	delta1 = abs(t - (h - c) / (4 * n1 + 2))
	delta2 = abs(t - (h - c) / (4 * n2 + 2))
	if delta1 < delta2:
		print(2 * n1 + 1)
	else:
		print(2 * n2 + 1)
	return None
n_tests = int(input())
for i_test in range(1, n_tests + 1):
	process_test_case(i_test)


T = int(input().strip())
eps = 1e-20

def diff(n):
	return abs(((n + 1) * h + n * c) / (2 * n + 1) - t)

def better(k, n):
	return (2 * k + 1) * abs((n + 1) * (h - t) + n * (c - t)) >= (2 * n + 1) * abs((k + 1) * (h - t) + k * (c - t))

def strictlybetter(k, n):
	return (2 * k + 1) * abs((n + 1) * (h - t) + n * (c - t)) > (2 * n + 1) * abs((k + 1) * (h - t) + k * (c - t))
for t in range(T):
	(h, c, t) = list(map(int, input().split()))
	if t >= h or h == c:
		print(1)
		continue
	elif 2 * t <= h + c:
		print(2)
		continue
	bestn = (h - t) // (2 * t - h - c)
	bestn = int(bestn)
	curdif = diff(bestn)
	while bestn > 0 and better(bestn - 1, bestn):
		bestn -= 1
	while strictlybetter(bestn + 1, bestn):
		bestn += 1
	curdif = diff(bestn)
	if abs(h - t) <= curdif:
		print(1)
		continue
	if abs((h + c) / 2 - t) <= curdif:
		print(2)
		continue
	print(2 * bestn + 1)


from sys import stdin
from collections import Counter, deque
from bisect import bisect_left
input = stdin.buffer.readline
T = int(input())
for _ in range(T):
	(h, c, t) = map(int, input().split())
	if t * 2 <= h + c:
		print(2)
		continue
	a = int((t - h) / (h - 2 * t + c))
	b = a + 1
	tt = t * (2 * a + 1) * (2 * b + 1)
	aa = abs(tt - (a * (c + h) + h) * (2 * b + 1))
	bb = abs(tt - (b * (c + h) + h) * (2 * a + 1))
	print(2 * a + 1 if aa <= bb else 2 * b + 1)


from math import *

def r1(t):
	return t(input().strip())

def r2(t):
	return [t(i) for i in input().strip().split()]

def r3(t):
	return [t(i) for i in input().strip()]
for _ in range(int(input())):
	(h, c, t) = r2(int)
	ans1 = abs((h + c) / 2 - t)
	if ans1 == 0 or 2 * t <= h + c:
		print(2)
	elif h == t:
		print(1)
	else:
		a = h + c - 2 * t
		b = t - c
		x1 = max(1, -b / a)
		x1 = int(x1)
		x2 = x1 + 1
		ans1 = abs(x1 * h + (x1 - 1) * c - (2 * x1 - 1) * t)
		ans2 = abs(x2 * h + (x2 - 1) * c - (2 * x2 - 1) * t)
		if ans1 * (2 * x2 - 1) <= ans2 * (2 * x1 - 1):
			print(2 * x1 - 1)
		else:
			print(2 * x2 - 1)


from collections import defaultdict as dd
from collections import deque
import bisect
import heapq

def ri():
	return int(input())

def rl():
	return list(map(int, input().split()))

def solve():
	(h, c, t) = rl()
	(h, c, t) = (h - c, 0, t - c)
	if 2 * t <= h:
		print(2)
		return
	elif 6 * t >= 5 * h:
		print(1)
		return
	else:
		x = t // (2 * t - h)
		while h * x <= t * (2 * x - 1):
			x -= 1
		while h * (x + 1) > t * (2 * x + 1):
			x += 1
		y = x + 1
		if 2 * t * (2 * x - 1) * (2 * y - 1) >= x * h * (2 * y - 1) + y * h * (2 * x - 1):
			print(2 * x - 1)
		else:
			print(y * 2 - 1)
mode = 'T'
if mode == 'T':
	t = ri()
	for i in range(t):
		solve()
else:
	solve()


import math
t = int(input())
for _ in range(t):
	(h, c, t) = map(int, input().split())
	even_last = h + c - t * 2
	if even_last >= 0:
		print(2)
	else:
		a = h - t
		b = 2 * t - (h + c)
		k = 2 * (a // b) + 1
		v1 = abs(k // 2 * c + (k + 1) // 2 * h - k * t)
		v2 = abs((k + 2) // 2 * c + (k + 3) // 2 * h - (k + 2) * t)
		if v1 * (k + 2) <= v2 * k:
			print(k)
		else:
			print(k + 2)


from decimal import *
getcontext().prec = 20

def v1(k):
	num = Decimal(k * h + (k - 1) * c)
	den = Decimal(2 * k - 1)
	return num / den

def v(k):
	return (k * h + (k - 1) * c) / (2 * k - 1)
import sys
inf = float('inf')

def low(t):
	(l, r) = (2, 10000000)
	ans = -1
	while l < r:
		mid = l + r >> 1
		v1 = v(mid)
		if v1 >= t:
			val = mid
			l = mid + 1
			ans = mid
		else:
			r = mid
	return ans

def up(t):
	(l, r) = (2, 10000000)
	ans = -1
	while l < r:
		mid = l + r >> 1
		v1 = v(mid)
		if v1 <= t:
			val = mid
			r = mid
			ans = mid
		else:
			l = mid + 1
	return ans
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if h <= t:
		print(1)
	elif (h + c) // 2 >= t:
		print(2)
	else:
		idx1 = low(t)
		idx2 = up(t)
		idx = -1
		ans = inf
		for i in range(idx1, idx2 + 1):
			val = abs(t - v1(i))
			if val < ans:
				idx = i
				ans = val
		print(2 * idx - 1)


def temp(h, c, cups, k):
	if cups % 2 == 0:
		return (h + c) // 2
	n = cups // 2
	return (abs((h + c) * n + h - k * cups), cups)

def lessthanore(a, b):
	return a[0] * b[1] <= a[1] * b[0]

def check(n, k, h, c):
	correct = abs(temp(h, c, 2 * n + 1) - k)
	before = abs(temp(h, c, 2 * n - 1) - k)
	after = abs(temp(h, c, 2 * n + 3) - k)
	print(correct, before, after)
	return correct < before and correct < after

def simcups(h, c, n):
	i = 0
	temp = 0
	while i <= n:
		if i % 2 == 0:
			temp += h
		else:
			temp += c
		i += 1
		print(temp / i)

def mincups(h, c, k):
	avg = (h + c) / 2
	if k <= avg:
		return 2
	if k >= h:
		return 1
	n = (h - k) / (2 * k - h - c)
	a = temp(h, c, 2 * int(n) + 1, k)
	b = temp(h, c, 2 * int(n) + 3, k)
	if lessthanore(a, b):
		return 2 * int(n) + 1
	return 2 * int(n) + 3
t = int(input())
for i in range(t):
	(h, c, k) = map(int, input().split())
	print(mincups(h, c, k))


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

def gift():
	for _ in range(t):
		(h, c, tem) = list(map(int, input().split()))
		if h == tem:
			yield 1
		elif (h + c) / 2 > tem:
			mid = (h + c) / 2
			edif = abs(h - c)
			ldif = abs(mid - c)
			if edif >= ldif:
				yield 2
			else:
				yield 1
		elif (h + c) / 2 == tem:
			yield 2
		else:
			dif = tem - (h + c) / 2
			posans = (h - c) / 2 // dif
			bibi = (h - c) / 2 % dif
			if posans % 2 == 0:
				posans += 1
			oposans = posans + 2
			pdif = abs(tem - ((h + c) / 2 + (h - c) / 2 / posans))
			edif = abs(tem - ((h + c) / 2 + (h - c) / 2 / oposans))
			if oposans >= 3:
				kposans = posans - 2
				kdif = abs(tem - ((h + c) / 2 + (h - c) / 2 / kposans))
				mindif = min(pdif, edif, kdif)
				if mindif == pdif:
					yield int(posans)
				elif mindif == edif:
					yield int(oposans)
				else:
					yield int(kposans)
			elif pdif < edif:
				yield int(posans)
			else:
				yield int(oposans)
t = int(input())
ans = gift()
print(*ans, sep='\n')


from decimal import *
import sys, re, math
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd, floor
from heapq import heappush, heappop, heapify, nlargest, nsmallest

def STR():
	return list(input())

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST():
	return list(map(int, input().split()))

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def sortListWithIndex(listOfTuples, idx):
	return sorted(listOfTuples, key=lambda x: x[idx])

def sortDictWithVal(passedDic):
	temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
	toret = {}
	for tup in temp:
		toret[tup[0]] = tup[1]
	return toret

def sortDictWithKey(passedDic):
	return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def calc(k):
	return Decimal((h + c) * k + h) / Decimal(2 * k + 1)
T = INT()
while T != 0:
	(h, c, t) = MAP()
	mn = (h + c) / 2
	ans = 2
	diff = abs(mn - t)
	if h + c != 2 * t:
		k = (t - h) / (h + c - 2 * t)
		if k < 0:
			ans = 2
		elif k == 0:
			ans = 1
		else:
			ab = calc(floor(k))
			abc = calc(ceil(k))
			if abs(t - ab) <= abs(t - abc):
				if abs(t - ab) < abs(t - h):
					ans = 2 * floor(k) + 1
				else:
					ans = 1
			elif abs(t - abc) < abs(t - h):
				ans = 2 * ceil(k) + 1
			else:
				ans = 1
		print(ans)
	elif h != t:
		ans = 2
		print(ans)
	else:
		print(1)
	T -= 1


import sys
input = lambda : sys.stdin.readline().rstrip()
T = int(input())
for _ in range(T):
	(h, c, t) = map(int, input().split())
	a = h - t
	b = t - c
	if a <= 0:
		print(1)
	elif a >= b:
		print(2)
	else:
		mi = (a, 1)
		mii = 1
		if abs((a + b) * mi[1]) < mi[0] * 2:
			mi = (abs(a + b), 2)
			mii = 2
		s = max(b // (b - a), 1)
		for x in range(s, s + 2):
			t = abs(a * x - b * (x - 1))
			if t * mi[1] < mi[0] * (2 * x - 1):
				mi = (t, 2 * x - 1)
				mii = x * 2 - 1
		print(mii)


def abc(i, j, c):
	global a, b
	ans = i
	while i <= j:
		mid = i + (j - i) // 2
		if mid * b + (mid + 1) * a <= c * (2 * mid + 1):
			ans = mid
			i = mid + 1
		else:
			j = mid - 1
	return ans

def bca(i, j, c):
	global a, b
	ans = i
	while i <= j:
		mid = i + (j - i) // 2
		if mid * b + (mid + 1) * a >= c * (2 * mid + 1):
			ans = mid
			i = mid + 1
		else:
			j = mid - 1
	return ans
	return ans
t = int(input())
for _ in range(t):
	(a, b, c) = map(int, input().split())
	if a == b:
		print(1)
		continue
	x = (a + b) / 2
	x = abs(c - x)
	ans = 2
	if b >= a:
		y = abc(0, 10 ** 7, c)
		m = abs(y * b + (y + 1) * a - (2 * y + 1) * c)
		y += 1
		v = abs(y * b + (y + 1) * a - (2 * y + 1) * c)
		if m == v:
			if abs((y * b + (y + 1) * a) / (2 * y + 1) - c) < x:
				ans = 2 * y + 1
		else:
			y -= 1
			m = (y * b + (y + 1) * a) / (2 * y + 1)
			if abs(m - c) < x:
				ans = 2 * y + 1
				x = abs(m - c)
			y += 1
			m = (y * b + (y + 1) * a) / (2 * y + 1)
			if abs(m - c) < x:
				ans = 2 * y + 1
				x = abs(m - c)
	else:
		y = bca(0, 10 ** 7, c)
		m = abs(y * b + (y + 1) * a - (2 * y + 1) * c)
		y += 1
		v = abs(y * b + (y + 1) * a - (2 * y + 1) * c)
		if m == v:
			if abs((y * b + (y + 1) * a) / (2 * y + 1) - c) < x:
				ans = 2 * y + 1
		else:
			y -= 1
			m = (y * b + (y + 1) * a) / (2 * y + 1)
			if abs(m - c) < x:
				ans = 2 * y + 1
				x = abs(m - c)
			y += 1
			m = (y * b + (y + 1) * a) / (2 * y + 1)
			if abs(m - c) < x:
				ans = 2 * y + 1
				x = abs(m - c)
	print(ans)


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
mod = int(pow(10, 9) + 7)
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def l():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
for i in range(int(input())):
	(h, c, t) = map(int, input().split())
	if (h + c) / 2 >= t:
		print(2)
	else:
		a = (h - t) // (2 * t - h - c)
		b = a + 1
		print(2 * a + 1 if 2 * t * (2 * a + 1) * (2 * b + 1) >= (2 * b + 1) * ((a + 1) * h + a * c) + (2 * a + 1) * ((b + 1) * h + b * c) else 2 * b + 1)


from math import ceil
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if h + c >= t * 2:
		print(2)
	elif h - t == 0:
		print(1)
	else:
		ans = abs(2 * t - c - h)
		temp = ceil((h - t) / ans)
		res = 1000000
		hh = 0
		cc = 0
		res2 = 1
		for i in range(max(temp, 1), temp + 2):
			for j in range(i - 1, i):
				newres = abs(h * i + c * j - t * (i + j))
				if newres * res2 < res * (i + j):
					res = newres
					res2 = i + j
					hh = i
					cc = j
		print(hh + cc)


import math
T = int(input())
for _ in range(T):
	(h, c, t) = map(int, input().split())
	if 2 * t <= h + c:
		print(2)
	else:
		A = (h - t) // (2 * t - h - c)
		k = 2 * A + 1
		Ans = 100000000000
		ans = 0
		for i in range(k + 3, k - 1, -1):
			A = abs((i + 1) // 2 * h + i // 2 * c - t * i)
			if A * ans <= Ans * i:
				Ans = A
				ans = i
		print(ans)


import math

def getval(y, h, c, t):
	return abs(((y + 1) * h + y * c - (2 * y + 1) * t) / (2 * y + 1))
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	avg = (h + c) / 2
	if avg >= t:
		print(2)
		continue
	b = (t - h) / (h + c - 2 * t)
	b1 = math.ceil(b)
	if getval(b1 - 1, h, c, t) <= getval(b1, h, c, t):
		print(2 * b1 - 1)
	else:
		print(2 * b1 + 1)


from math import ceil
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if h + c >= t * 2:
		print(2)
	elif h - t == 0:
		print(1)
	else:
		valh = (c - t) // (h + c - 2 * t)
		valc = valh - 1
		ans = abs(h * valh + c * valc - t * (2 * valh - 1))
		ans1 = 2 * valh - 1
		valh1 = valh + 1
		valc1 = valh
		ans2 = abs(h * valh1 + c * valc1 - t * (2 * valh + 1))
		ans3 = 2 * valh + 1
		if ans2 * ans1 < ans * ans3:
			print(2 * valh + 1)
		else:
			print(2 * valh - 1)


def count(h, c, t):
	if h + c >= 2 * t:
		ans = 2
	else:
		k = int((h - t) / (2 * t - h - c))
		if 4 * k * (k + 1) * (h + c) + (6 * k + 5) * h + c * (2 * k + 1) <= 2 * t * (2 * k + 1) * (2 * k + 3):
			ans = 2 * k + 1
		else:
			ans = 2 * k + 3
	return ans
t = int(input())
for _ in range(t):
	(h, c, t) = map(int, input().split())
	print(count(h, c, t))


import math as ma
t = int(input())
for _ in range(t):
	(h, c, t) = list(map(int, input().split()))
	if (h + c) // 2 == t:
		print(2)
	else:
		a = [[abs(h - t), 1]]
		a.append([abs((h + c) / 2 - t), 2])
		if (h + c) / 2 < t:
			b = t - (h + c) / 2
			e = (h - c) / (2 * b)
			d = int(e)
			f = ma.ceil(e)
			if d == f:
				f += 1
			if d > 0 and d % 2 != 0:
				a.append([abs(t - (h + c) / 2 - (h - c) / (2 * d)), d])
				d += 2
				a.append([abs(t - (h + c) / 2 - (h - c) / (2 * d)), d])
				d += 2
				a.append([abs(t - (h + c) / 2 - (h - c) / (2 * d)), d])
				d += 2
				a.append([abs(t - (h + c) / 2 - (h - c) / (2 * d)), d])
				d -= 6
				a.append([abs(t - (h + c) / 2 - (h - c) / (2 * d)), d])
				d -= 2
				if d > 0:
					a.append([abs(t - (h + c) / 2 - (h - c) / (2 * d)), d])
				d -= 2
				if d > 0:
					a.append([abs(t - (h + c) / 2 - (h - c) / (2 * d)), d])
			if f > 0 and f % 2 != 0:
				d = f
				a.append([abs(t - (h + c) / 2 - (h - c) / (2 * d)), d])
				d += 2
				a.append([abs(t - (h + c) / 2 - (h - c) / (2 * d)), d])
				d += 2
				a.append([abs(t - (h + c) / 2 - (h - c) / (2 * d)), d])
				d += 2
				a.append([abs(t - (h + c) / 2 - (h - c) / (2 * d)), d])
				d -= 6
				a.append([abs(t - (h + c) / 2 - (h - c) / (2 * d)), d])
				d -= 2
				if d > 0:
					a.append([abs(t - (h + c) / 2 - (h - c) / (2 * d)), d])
				d -= 2
				if d > 0:
					a.append([abs(t - (h + c) / 2 - (h - c) / (2 * d)), d])
		print(int(min(a)[1]))


import math
t = int(input())
for x in range(t):
	[h, c, t] = list(map(int, input().split()))
	if t <= (h + c) / 2:
		print(2)
	else:
		y = (t - c) / (2 * t - h - c)
		y1 = int(y)
		y2 = y1 + 1
		z1 = abs((h * y1 + c * (y1 - 1)) * (2 * y2 - 1) - t * (2 * y1 - 1) * (2 * y2 - 1))
		z2 = abs((h * y2 + c * (y2 - 1)) * (2 * y1 - 1) - t * (2 * y1 - 1) * (2 * y2 - 1))
		if z1 > z2:
			print(2 * y2 - 1)
		else:
			print(2 * y1 - 1)


from math import floor, ceil
from fractions import Fraction as F
T = int(input())
for _ in range(T):
	(H, C, O) = map(int, input().split())
	if H == C or O >= H:
		print(1)
	elif O <= (H + C) / 2:
		print(2)
	else:
		x = F(O - C, H - C)
		N = F(x - 1, 1 - 2 * x)
		low = floor(N)
		hi = ceil(N)
		lowV = F(low + 1, 2 * low + 1)
		hiV = F(hi + 1, 2 * hi + 1)
		lowD = lowV - x
		hiD = x - hiV
		if lowD <= hiD:
			print(low * 2 + 1)
		else:
			print(hi * 2 + 1)


import sys
input = sys.stdin.readline

def solve():
	(h, c, t) = map(int, input().split())
	if h <= t:
		return 1
	if 2 * t <= h + c:
		return 2
	if 2 * h + c <= t * 3:
		if abs(2 * h + c - t * 3) >= (h - t) * 3:
			return 1
		else:
			return 3
	l = 0
	r = 500000
	while r - l > 1:
		m = (l + r) // 2
		if t * (2 * m + 1) < (m + 1) * h + m * c:
			l = m
		else:
			r = m
	if abs((l + 1) * h + l * c - t * (2 * l + 1)) * (2 * r + 1) <= abs((r + 1) * h + r * c - t * (2 * r + 1)) * (2 * l + 1):
		return 2 * l + 1
	else:
		return 2 * r + 1

def main():
	T = int(input())
	for _ in range(T):
		print(solve())
main()


from sys import stdin, exit
import fractions
input = stdin.readline

def i():
	return input()

def ii():
	return int(input())

def iis():
	return map(int, input().split())

def liis():
	return list(map(int, input().split()))

def print_array(a):
	print(' '.join(map(str, a)))

def eq(x):
	return F(h * x + c * (x - 1), x + x - 1)

def bin_ser(lb, ub, lv, uv, target):
	elm_mid = lb
	while abs(lb - ub) > 1:
		elm_mid = (lb + ub) // 2
		mid = eq(elm_mid)
		if mid < target:
			ub = elm_mid
			uv = mid
		elif mid > target:
			lb = elm_mid
			lv = mid
		else:
			break
	return elm_mid
F = fractions.Fraction
t = ii()
for _ in range(t):
	(h, c, t) = iis()
	if t <= (h + c) / 2:
		print(2)
	elif t >= h:
		print(1)
	else:
		i = 1
		while True:
			i *= 2
			calc = eq(i)
			if calc < t:
				mid = bin_ser(1, i, h, calc, t)
				ops = [[mid - 1, eq(mid - 1)], [mid, eq(mid)], [mid + 1, eq(mid + 1)]]
				mini = float('inf')
				resp = float('inf')
				for (i, j) in ops:
					if abs(t - j) < mini:
						mini = abs(t - j)
						resp = i
				print(resp * 2 - 1)
				break


def rs():
	return input().strip()

def ri():
	return int(input())

def ria():
	return list(map(int, input().split()))

def ia_to_s(a):
	return ' '.join([str(s) for s in a])

def temp_at_2k_1(h, c, k):
	return (k * h + (k - 1) * c, 2 * k - 1)

def solve(h, c, t):
	if t <= (h + c) // 2:
		return 2
	k_left = 1
	k_right = 10 ** 19
	while k_right - k_left > 1:
		k_mid = (k_left + k_right) // 2
		(t_mid_n, t_mid_d) = temp_at_2k_1(h, c, k_mid)
		if t_mid_n > t * t_mid_d:
			k_left = k_mid
		else:
			k_right = k_mid
	abs_min = (abs(2 * t - (h + c)), 2)
	ans = 2
	test = [x for x in [k_left + 2, k_left + 1, k_left, k_left - 1, k_left - 2] if x > 0]
	for at in test:
		(t_at_n, t_at_d) = temp_at_2k_1(h, c, at)
		if abs_min[1] * abs(t_at_d * t - t_at_n) <= abs_min[0] * t_at_d:
			abs_min = (abs(t_at_d * t - t_at_n), t_at_d)
			ans = 2 * at - 1
	return ans

def main():
	for _ in range(ri()):
		(h, c, t) = ria()
		print(solve(h, c, t))
main()


for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if h == t:
		print(1)
	else:
		avg = (h + c) / 2
		if avg == t:
			print(2)
		elif avg > t:
			print(2)
		else:
			dif = t - avg
			j = int(abs((c - h) // (2 * dif)))
			if j % 2 == 0:
				j += 1
			if dif - (h - c) / (2 * j) >= abs(dif - (h - c) / (2 * (j - 2))):
				print(j - 2)
			else:
				print(j)


import fractions
f = fractions.Fraction
tests = int(input())
for _ in range(tests):
	(h, c, t) = map(int, input().split())
	av1 = (h + c) / 2
	if (h + c) / 2 == t:
		print(2)
	else:
		x = (t - h) / (h + c - 2 * t)
		if x < 0:
			if abs(h - t) <= abs(t - av1):
				print(1)
				continue
			else:
				print(2)
				continue
		x = int(x)
		av2 = f((x + 1) * h + x * c, 2 * x + 1)
		av3 = f((x + 2) * h + (x + 1) * c, 2 * (x + 1) + 1)
		if abs(av3 - t) < abs(av2 - t):
			x = x + 1
			av2 = av3
		if abs(t - av1) > abs(t - av2):
			print(2 * x + 1)
		elif abs(t - av1) == abs(t - av2):
			print(min(2, 2 * x + 1))
		else:
			print(2)


from decimal import *
getcontext().prec = 40
from math import ceil
t = int(input())
for _ in range(0, t):
	(h, c, t) = map(int, input().split())
	if h + c >= 2 * t:
		print(2)
	else:
		num = t - c
		den = 2 * t - h - c
		x = ceil(num / den)
		ans = 2 * x - 1
		diff = 10 ** 9 + 7
		for i in range(x, x + 11):
			if abs(Decimal(i * h + (i - 1) * c) / Decimal(2 * i - 1) - t) < diff:
				ans = 2 * i - 1
				diff = abs(Decimal(i * h + (i - 1) * c) / Decimal(2 * i - 1) - t)
		for i in range(max(1, x - 10), x):
			if abs(Decimal(i * h + (i - 1) * c) / Decimal(2 * i - 1) - t) <= diff:
				ans = 2 * i - 1
				diff = abs(Decimal(i * h + (i - 1) * c) / Decimal(2 * i - 1) - t)
		print(ans)


import sys
import decimal as dc
dc.getcontext().prec = 18
readline = sys.stdin.readline
readlines = sys.stdin.readlines
ns = lambda : readline().rstrip()
ni = lambda : int(readline().rstrip())
nm = lambda : map(int, readline().split())
nl = lambda : list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

def calc(x, t, h, c):
	return abs(dc.Decimal(t) - dc.Decimal(x * h + (x - 1) * c) / dc.Decimal(x * 2 - 1))

def solve():
	(h, c, t) = nm()
	if t * 2 <= h + c:
		print(2)
		return
	x = (t - c) // (2 * t - h - c)
	cmax = abs(dc.Decimal(t) - dc.Decimal(h + c) / dc.Decimal(2))
	cidx = -1
	for i in range(x + 3, max(x - 4, 0), -1):
		if cmax >= calc(i, t, h, c):
			cmax = calc(i, t, h, c)
			cidx = i
	print(cidx * 2 - 1 if cidx >= 0 else 2)
	return
T = ni()
for _ in range(T):
	solve()


t = int(input())

def main():
	(hot, cold, temp) = map(int, input().split())
	if temp <= (hot + cold) // 2:
		return 2
	k = (hot - temp) // (2 * temp - hot - cold)
	l = abs(k * (hot + cold) + hot - temp * (2 * k + 1)) * (2 * k + 3)
	u = abs((k + 1) * (hot + cold) + hot - temp * (2 * k + 3)) * (2 * k + 1)
	if l <= u:
		return 2 * k + 1
	return 2 * k + 3
for _ in range(t):
	print(main())


from fractions import Fraction
import sys
import bisect
import heapq
from math import *
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
mod = pow(10, 9) + 7

def inp():
	return sys.stdin.readline().strip()

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def graph(vertex):
	return [[] for i in range(0, vertex + 1)]

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)
import decimal

def func(n, h, c):
	return (n + 1) * h + (n - 1) * c

def solve():
	(h, c, t) = sep()
	lowest = (h + c) / 2
	highest = h
	if t >= highest:
		out(1)
		nextline()
	elif t <= lowest:
		out(2)
		nextline()
	else:
		temp = (h - c) / (2 * t - (h + c))
		n1 = floor(temp)
		if n1 % 2 == 0:
			n1 -= 1
		n2 = ceil(temp)
		if n2 % 2 == 0:
			n2 += 1
		ansn1 = func(n1, h, c)
		ansn2 = func(n2, h, c)
		if abs(2 * n1 * t - ansn1) / (2 * n1) <= abs(2 * n2 * t - ansn2) / (2 * n2):
			if abs(2 * n1 * t - ansn1) / (2 * n1) < abs(t - highest) and abs(2 * n1 * t - ansn1) / (2 * n1) < abs(t - lowest):
				out(n1)
				nextline()
			elif abs(t - lowest) < abs(t - highest):
				out(2)
				nextline()
			else:
				out(1)
				nextline()
		elif abs(2 * n2 * t - ansn2) / (2 * n2) < abs(t - highest) and abs(2 * n2 * t - ansn2) / (2 * n2) < abs(t - lowest):
			out(n2)
			nextline()
		elif abs(t - lowest) < abs(t - highest):
			out(2)
			nextline()
		else:
			out(1)
			nextline()
testcase(int(inp()))


for _ in range(int(input())):
	(h, c, t) = [int(i) for i in input().split()]
	if t <= (h + c) / 2:
		print(2)
	else:
		l = 1
		r = 10 ** 12
		mid = (l + h) / 2
		while l < r:
			mid = (l + r) // 2
			sum = (h * mid + c * (mid - 1)) / (2 * mid - 1)
			if sum > t:
				l = mid + 1
			else:
				r = mid
		l11 = abs(h * l + c * (l - 1) - t * (2 * l - 1)) * (2 * (l - 1) - 1)
		l -= 1
		l22 = abs(h * l + c * (l - 1) - t * (2 * l - 1)) * (2 * (l + 1) - 1)
		if l11 < l22:
			print(2 * (l + 1) - 1)
		else:
			print(2 * l - 1)


from fractions import Fraction as frac
t = int(input())
for _ in range(t):
	(hotTemp, coldTemp, barrelTemp) = map(int, input().rstrip().split())
	if barrelTemp == hotTemp:
		print(1)
	elif hotTemp + coldTemp >= barrelTemp * 2:
		print(2)
	else:
		cups1 = (barrelTemp - coldTemp) // (2 * barrelTemp - (hotTemp + coldTemp))
		cups2 = cups1 + 1
		finalTemp1 = frac(hotTemp * cups1 + coldTemp * (cups1 - 1), 2 * cups1 - 1)
		finalTemp2 = frac(hotTemp * cups2 + coldTemp * (cups2 - 1), 2 * cups2 - 1)
		if abs(barrelTemp - finalTemp1) <= abs(barrelTemp - finalTemp2):
			cups1 = 2 * cups1 - 1
			print(cups1)
		else:
			cups2 = 2 * cups2 - 1
			print(cups2)


n = int(input())
for i in range(n):
	read = input().split(' ')
	a = float(read[0])
	b = float(read[1])
	c = float(read[2])
	if c == a:
		print(1)
	elif abs(c - (a + b) / 2) == 0:
		print(2)
	else:
		k = abs(c - a) / abs(a + b - 2 * c)
		k = int(2 * k + 1)
		avr = abs(c - a)
		res = 1
		if abs(c - (a + b) / 2) < avr:
			avr = abs(c - (a + b) / 2)
			res = 2
		Min = k
		Max = min(1000000, k + 2)
		for j in range(Min, Max + 1):
			if j % 2:
				h1 = int(j / 2) + 1
				c1 = int(j / 2)
				current = abs(c - (a * h1 + b * c1) / j)
				if current < avr:
					avr = current
					res = j
		print(res)


from sys import stdin, stdout
import math
t = int(stdin.readline())
for _ in range(t):
	(h, c, t) = map(int, stdin.readline().split())
	if 3 * (2 * t - h) >= 2 * h + c:
		print(1)
		continue
	if 2 * t <= h + c:
		print(2)
		continue
	n = (h - t) // (2 * t - h - c)
	(a1, b1) = (h * (n + 1) + c * n, 2 * n + 1)
	(a2, b2) = (h * (n + 2) + c * (n + 1), 2 * n + 3)
	if b2 * abs(a1 - b1 * t) <= b1 * abs(a2 - b2 * t):
		print(2 * n + 1)
	else:
		print(2 * n + 3)


from math import ceil
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if t <= (h + c) / 2:
		print(2)
	else:
		k = (h - t) // (2 * t - h - c)
		if abs((2 * k + 3) * t - k * h - 2 * h - k * c - c) * (2 * k + 1) < abs((2 * k + 1) * t - k * h - h - k * c) * (2 * k + 3):
			print(2 * k + 3)
		else:
			print(2 * k + 1)


import math
from decimal import *
T = int(input())
for i in range(T):
	(h, c, t) = map(int, input().split())
	a = h - t
	b = 2 * t - h - c
	if b <= 0:
		print(2)
	else:
		e = math.ceil(a / b)
		r = abs(Decimal((h + c) * e + h) / Decimal(2 * e + 1) - t)
		r1 = abs(Decimal(h + c) / 2 - t)
		e1 = e + 1
		e2 = e - 1
		r2 = abs(Decimal((h + c) * e1 + h) / Decimal(2 * e1 + 1) - t)
		r3 = abs(Decimal((h + c) * e2 + h) / Decimal(2 * e2 + 1) - t)
		a = [(r, e), (r2, e1), (r3, e2)]
		a.sort()
		q = a[0][0]
		if q < r1:
			print(2 * a[0][1] + 1)
		else:
			print(2)


def cups(x, h, c, t):
	error = (x + 1) * h + x * c - t * (2 * x + 1)
	return abs(error)

def f(h, c, t):
	if h + c >= 2 * t:
		return 2
	x = (h - t) // (2 * t - h - c)
	e1 = cups(x, h, c, t)
	e2 = cups(x + 1, h, c, t)
	if e1 * (2 * x + 3) <= e2 * (2 * x + 1):
		return 2 * x + 1
	else:
		return 2 * x + 3
T = int(input())
for t in range(T):
	(h, c, t) = map(int, input().rstrip().split())
	print(f(h, c, t))


t = int(input())
for i in range(t):
	s = input().split()
	h = int(s[0])
	c = int(s[1])
	te = int(s[2])
	if te == h:
		print('1')
	elif h - te == te - c:
		print('2')
	else:
		sum = c + h
		if h - te > te - c:
			print('2')
		else:
			a = h - te
			b = sum - 2 * te
			f = int(a / b)
			f = abs(f)
			k = abs(2 * f + 1)
			l = [k - 2, k, k + 2]
			p = [0, 0, 0]
			for j in range(3):
				p[j] = (a + b * (l[j] - 1) / 2) / l[j]
				p[j] = abs(p[j])
			print(l[p.index(min(p))])


import os
import sys
from io import BytesIO, IOBase
import math

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
import os
import sys
from io import BytesIO, IOBase

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for xyz in range(0, int(input())):
	(h, c, t) = map(int, input().split())
	if 2 * t - h - c <= 0:
		print(2)
	elif t >= h:
		print(1)
	else:
		k = (h - t) // (2 * t - h - c)
		term1 = k * (h + c) + h
		term1 -= t * (2 * k + 1)
		term2 = (k + 1) * (h + c)
		term2 += h
		term2 -= t * (2 * k + 3)
		if abs(term1 * (2 * k + 3)) <= abs(term2 * (2 * k + 1)):
			print(2 * k + 1)
		else:
			print(2 * k + 3)


import sys
input = sys.stdin.buffer.readline

def solution():
	for _ in range(int(input())):
		(h, c, t) = map(int, input().split())
		bb = (h + c) / 2
		if t <= bb:
			print(2)
		else:
			k = (h - t) / (2 * t - h - c)
			k = int(k)
			if abs(k * (h + c) + h - t * (2 * k + 1)) * (2 * k + 3) <= abs((k + 1) * (h + c) + h - t * (2 * k + 3)) * (2 * k + 1):
				print(2 * k + 1)
			else:
				print(2 * (k + 1) + 1)
solution()


import sys
pprint = lambda s: print(' '.join(map(str, s)))
input = lambda : sys.stdin.readline().strip()
ipnut = input
for i in range(int(input())):
	(h, c, t) = map(int, input().split())
	if t <= (h + c) / 2:
		print(2)
		continue
	l = 1
	r = 1000000000000000000

	def f(m):
		return m * (h + c) + h
	l = (t - h) // (c + h - 2 * t)
	r = l + 1
	ansl = (abs(t * (2 * l + 1) - f(l)) * (r * 2 + 1), 2 * l + 1)
	ansr = (abs(t * (r * 2 + 1) - f(r)) * (2 * l + 1), r * 2 + 1)
	print(min(ansl, ansr)[1])


import sys
input = sys.stdin.readline

def solve(mid):
	return (mid + 1) * h + mid * c >= t * (2 * mid + 1)
t = int(input())
for _ in range(t):
	(h, c, t) = map(int, input().split())
	if 2 * t <= h + c:
		print(2)
		continue
	if h <= t:
		print(1)
		continue
	ok = 0
	ng = 10 ** 20
	while abs(ok - ng) > 1:
		mid = (ok + ng) // 2
		if solve(mid):
			ok = mid
		else:
			ng = mid
	ans = 10 ** 30
	t_ = (2 * ok + 1) * (2 * ng + 1) * t
	if ((ok + 1) * h + c * ok) * (2 * ng + 1) - t_ > t_ - ((ng + 1) * h + c * ng) * (2 * ok + 1):
		print(2 * ng + 1)
	else:
		print(2 * ok + 1)


import bisect
import decimal
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate

def lcm(a, b):
	return a * b // math.gcd(a, b)

def sort_dict(key_value):
	return sorted(key_value.items(), key=lambda kv: (kv[1], kv[0]))

def list_input():
	return list(map(int, input().split()))

def num_input():
	return map(int, input().split())

def string_list():
	return list(input())

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def binaryToDecimal(n):
	return int(n, 2)

def solve():
	(h, c, t) = num_input()
	if h == t:
		print(1)
	else:
		try:
			ans = math.ceil((h - t) / abs(abs(2 * t - h) - c)) * 2 + 1
		except ZeroDivisionError:
			print(2)
			return
		t1 = (h + c) / 2
		t2 = decimal.Decimal(c * (ans // 2) + h * (ans // 2 + 1)) / decimal.Decimal(ans)
		x = abs(t2 - t)
		while x >= abs(decimal.Decimal(c * ((ans - 2) // 2) + h * ((ans - 2) // 2 + 1)) / decimal.Decimal(ans - 2) - t):
			ans -= 2
			t2 = decimal.Decimal(c * (ans // 2) + h * (ans // 2 + 1)) / decimal.Decimal(ans)
			x = abs(t2 - t)
		t2 = decimal.Decimal(c * (ans // 2) + h * (ans // 2 + 1)) / decimal.Decimal(ans)
		if abs(t1 - t) < abs(t2 - t):
			print(2)
		else:
			print(ans)
decimal.getcontext().prec = 46
t = int(input())
for _ in range(t):
	solve()


import math
for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if t == h:
		print(1)
		continue
	if 2 * t <= h + c:
		print(2)
		continue
	x = max(1, (t - c) // (2 * t - h - c))
	y = x + 1
	try1 = x * h + (x - 1) * c
	try2 = y * h + (y - 1) * c
	diff1 = abs(try1 - t * (2 * x - 1)) / (2 * x - 1)
	diff2 = abs(try2 - t * (2 * y - 1)) / (2 * y - 1)
	if diff1 <= diff2:
		print(2 * x - 1)
	else:
		print(2 * y - 1)


import sys
import math
input = sys.stdin.readline
for f in range(int(input())):
	(h, c, t) = map(int, input().split())
	if t == h:
		print(1)
	elif t <= (h + c) / 2:
		print(2)
	else:
		diff = t - (h + c) / 2
		k1 = math.floor(((h - c) / (2 * diff) - 1) / 2)
		k2 = k1 + 1
		d1 = abs(diff - (h - c) / (4 * k1 + 2))
		d2 = abs(diff - (h - c) / (4 * k2 + 2))
		if d2 < d1:
			print(2 * k2 + 1)
		else:
			print(2 * k1 + 1)


import math

def solve(h, c, t):
	if h + c >= 2 * t:
		return 2
	a = (c - t) / float(h + c - 2 * t)
	a1 = math.floor(a)
	a2 = math.ceil(a)
	tmp = (2 * a2 - 1) * (a1 * h + (a1 - 1) * c) + (2 * a1 - 1) * (a2 * h + (a2 - 1) * c) - 2 * t * (2 * a1 - 1) * (2 * a2 - 1)
	if tmp <= 0:
		return 2 * a1 - 1
	else:
		return 2 * a2 - 1
t = int(input())
for _ in range(t):
	(h, c, t) = list(map(int, input().split()))
	print(solve(h, c, t))


import math
test = int(input())
for _ in range(test):
	(h, c, t) = map(int, input().split())
	if t == h:
		print(1)
	elif t <= (h + c) // 2:
		print(2)
	else:
		x = (t - h) / (h + c - 2 * t)
		ceil = math.ceil(x)
		floor = math.floor(x)
		if abs((h + c) * ceil + h - t * (2 * ceil + 1)) * (2 * floor + 1) < abs((h + c) * floor + h - t * (2 * floor + 1)) * (2 * ceil + 1):
			print(2 * ceil + 1)
		else:
			print(2 * floor + 1)


from fractions import Fraction
t = int(input())
for testCase in range(t):
	(h, c, t) = [int(_) for _ in input().split()]
	if h == t:
		print(1)
	elif t <= (h + c) / 2:
		print(2)
	else:
		sumTemp = h + c
		minGuess = 0
		maxGuess = 555555
		while maxGuess - minGuess > 1:
			guess = (maxGuess + minGuess) // 2
			guessTemp = Fraction(h + sumTemp * guess, 2 * guess + 1)
			if guessTemp < t:
				maxGuess = guess
			else:
				minGuess = guess
		diffLow = abs(Fraction(h + sumTemp * minGuess, 2 * minGuess + 1) - t)
		diffHi = abs(Fraction(h + sumTemp * maxGuess, 2 * maxGuess + 1) - t)
		if diffLow <= diffHi:
			print(minGuess * 2 + 1)
		else:
			print(maxGuess * 2 + 1)


mod = 1000000007
from collections import Counter, defaultdict, deque
import sys
import math
import bisect
from collections import deque
for _ in range(int(input())):
	(h, c, t) = list(map(int, input().split()))
	av = (h + c) / 2
	if t >= h:
		print(1)
		continue
	elif t <= av:
		print(2)
		continue
	x = (h - t) // (2 * t - (h + c))
	t1 = (x + 1) * h + x * c
	t2 = (x + 2) * h + (x + 1) * c
	if abs(t * (2 * x + 1) - t1) * (2 * x + 3) <= abs(t * (2 * x + 3) - t2) * (2 * x + 1):
		print(x * 2 + 1)
	else:
		print(2 * x + 3)


import sys
input = sys.stdin.buffer.readline
import math
T = int(input())
for _ in range(T):
	(h, c, t) = map(int, input().split())
	if t <= (h + c) / 2:
		print(2)
	elif (h - t) % (2 * t - h - c) == 0:
		x = (h - t) // (2 * t - h - c)
		print(2 * x + 1)
	else:
		x = (h - t) / (2 * t - h - c)
		x1 = math.floor(x)
		x2 = math.ceil(x)
		A = (h * (x1 + 1) + c * x1) * (2 * x2 + 1) - t * (2 * x1 + 1) * (2 * x2 + 1)
		B = t * (2 * x1 + 1) * (2 * x2 + 1) - (h * (x2 + 1) + c * x2) * (2 * x1 + 1)
		if A > B:
			print(2 * x2 + 1)
		else:
			print(2 * x1 + 1)


def main(h, c, t):
	lowtmp = (h + c) / 2
	if t == h:
		return 1
	if t <= lowtmp:
		return 2

	def tempSum(n):
		return n * h + (n - 1) * c
	l = 1
	r = 10 ** 7
	while l < r:
		mid = (l + r) // 2
		if tempSum(mid) <= t * (2 * mid - 1):
			r = mid
		else:
			l = mid + 1
	ltemp = tempSum(l)
	lltemp = tempSum(l - 1)
	ln = 2 * l - 1
	lln = 2 * l - 3
	if abs(ltemp * lln - t * ln * lln) >= abs(lltemp * ln - t * ln * lln):
		return 2 * (l - 1) - 1
	else:
		return 2 * l - 1
N = int(input())
for _ in range(N):
	(h, c, t) = list(map(int, input().split(' ')))
	print(main(h, c, t))


import math
test = int(input())
for _ in range(test):
	(h, c, t) = map(int, input().split())
	if t <= (h + c) / 2:
		print(2)
	else:
		if (h - t) / (2 * t - h - c) - math.floor((h - t) / (2 * t - h - c)) >= 0.5:
			k = math.floor((h - t) / (2 * t - h - c)) + 1
			k1 = k + 1
		else:
			k = math.floor((h - t) / (2 * t - h - c))
			k1 = k + 1
		if (k * (h + c) + h) / (2 * k + 1) - t <= t - (k1 * (h + c) + h) / (2 * k1 + 1):
			print(2 * (k + 1) - 1)
		else:
			print(2 * (k1 + 1) - 1)


import sys
import math
import collections
from sys import stdin, stdout, setrecursionlimit
import bisect as bs
setrecursionlimit(2 ** 20)
M = 10 ** 9 + 7
T = int(stdin.readline())

def ceil(x, y):
	return x // y + (1 if x % y != 0 else 0)

def fun(x, h, c, t):
	return abs((x * c + (x + 1) * h) / (2 * x + 1) - t)
for _ in range(T):
	(h, c, t) = list(map(int, stdin.readline().split()))
	if h == t:
		print(1)
		continue
	if t <= (h + c) / 2:
		print(2)
		continue
	a = []
	x = ceil(h - t, 2 * t - c - h)
	y = (h - t) // (2 * t - c - h)
	num1 = y * c + (y + 1) * h - (2 * y + 1) * t
	den1 = 2 * y + 1
	num2 = (2 * x + 1) * t - x * c - (x + 1) * h
	den2 = 2 * x + 1
	if num1 * den2 - num2 * den1 > 0:
		print(int(2 * x + 1))
	else:
		print(int(2 * y + 1))


import math
from fractions import Fraction

def eq(A, B, x):
	return Fraction(x * (A + B) - B, 2 * x - 1)

def main():
	t = int(input())
	for _ in range(t):
		(A, B, C) = [int(x) for x in input().split()]
		if (A + B) / 2 == C:
			if A - C <= (A + B) / 2 - C:
				print('1')
			else:
				print('2')
		else:
			best_x = (B - C) / (A + B - 2 * C)
			if best_x < 1:
				if abs(A - C) <= abs((A + B) / 2 - C):
					print('1')
				else:
					print('2')
			else:
				x1 = math.floor(best_x)
				x2 = math.ceil(best_x)
				if abs(eq(A, B, x1) - C) <= abs(eq(A, B, x2) - C):
					res = x1 * 2 - 1
				else:
					res = x2 * 2 - 1
				print(res)
main()


for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if h == t:
		print(1)
	elif t - c <= h - t:
		print(2)
	else:
		temp = (t - h) / (h + c - 2 * t)
		if int(temp) == temp:
			print(int(2 * temp + 1))
		else:
			a = int(temp)
			b = a + 1
			if 2 * t * (2 * a + 1) * (2 * b + 1) >= (2 * b + 1) * ((a + 1) * h + a * c) + (2 * a + 1) * ((b + 1) * h + b * c):
				print(2 * a + 1)
			else:
				print(2 * b + 1)


def solve(h, c, t):
	if t == h:
		return 1
	if 2 * t <= h + c:
		return 2
	cands = []
	cands.append((h + c, 2, 2))
	bx = h - t
	by = 2 * t - h - c
	b = bx // by
	for d in range(2):
		bb = b + d
		aa = bb + 1
		cands.append((aa * h + bb * c, aa + bb, aa + bb))
	(ans, ansx, ansy) = (float('inf'), float('inf'), 1)
	for (ox, oy, o) in cands:
		if ansx * oy > ansy * abs(ox - oy * t):
			(ans, ansx, ansy) = (o, abs(ox - oy * t), oy)
	return ans
tests = int(input())
for _ in range(tests):
	(h, c, t) = map(int, input().split())
	print(solve(h, c, t))


from decimal import Decimal
t = int(input())
for _ in range(t):
	(h, c, t) = [int(x) for x in input().split()]
	s = h + c
	if 2 * t <= h + c:
		print(2)
	elif t == h:
		print(1)
	else:
		denom = 2 * t - h - c
		alpha1 = (h - t) // denom
		alpha2 = alpha1 - 1
		alpha3 = alpha1 + 1
		val1 = Decimal(alpha1 * s + h) / Decimal(2 * alpha1 + 1)
		val2 = Decimal(alpha2 * s + h) / Decimal(2 * alpha2 + 1)
		val3 = Decimal(alpha3 * s + h) / Decimal(2 * alpha3 + 1)
		diff1 = abs(Decimal(t) - val1)
		diff2 = abs(Decimal(t) - val2)
		diff3 = abs(Decimal(t) - val3)
		if alpha2 >= 0 and diff1 > diff2:
			alpha1 = alpha2
			diff1 = diff2
		if diff1 > diff3:
			alpha1 = alpha3
		print(2 * alpha1 + 1)


import math
t = int(input())
for _ in range(t):
	(h, c, t) = list(map(int, input().split(' ')))
	mid = (h + c) / 2
	if t <= mid:
		print(2)
	elif t >= h:
		print(1)
	else:
		x = (h - t) / (2 * t - h - c)
		x1 = int(math.floor(x))
		x2 = int(math.ceil(x))
		t1 = (h - c) * (x1 + 1) * (2 * x2 + 1) + (c - t) * (2 * x1 + 1) * (2 * x2 + 1)
		t2 = (h - c) * (x2 + 1) * (2 * x1 + 1) + (c - t) * (2 * x1 + 1) * (2 * x2 + 1)
		if abs(t1) > abs(t2):
			print(int(2 * x2 + 1))
		else:
			print(int(2 * x1 + 1))


import sys
input = sys.stdin.buffer.readline
for nt in range(int(input())):
	(h, c, t) = map(int, input().split())
	m = (h + c) / 2
	if m >= t:
		print(2)
		continue
	if h < t:
		print(1)
		continue
	m = 10 ** 18
	x = (t - c) / (2 * t - h - c)
	for i in range(max(1, int(x - 10)), int(x + 10)):
		if abs(t * (2 * i - 1) - (h * i + c * (i - 1))) / (2 * i - 1) < m:
			m = abs(t * (2 * i - 1) - (h * i + c * (i - 1))) / (2 * i - 1)
			ans = 2 * i - 1
	print(ans)


from fractions import Fraction
T = int(input())
for _ in range(T):
	(H, C, T) = map(int, input().split())
	if T * 2 <= H + C:
		print(2)
		continue
	else:

		def is_ok(k):
			return T * (2 * k - 1) <= H * k + C * (k - 1)
		ok = 1
		ng = 10 ** 18
		while ng - ok > 1:
			m = (ok + ng) // 2
			if is_ok(m):
				ok = m
			else:
				ng = m
		h1 = Fraction(H * ok + C * (ok - 1), 2 * ok - 1)
		h2 = Fraction(H * ng + C * (ng - 1), 2 * ng - 1)
		(d1, d2) = (abs(T - h1), abs(T - h2))
		if d1 <= d2:
			print(ok * 2 - 1)
		else:
			print(ng * 2 - 1)


import decimal

def f(h, c, t):
	if (h + c) / 2 == t:
		return 2
	n = (h - c) / 2 / (t - h / 2 - c / 2)
	if n < 0:
		return 2
	if n % 2 == 1 and n == int(n):
		return int(n)
	n = int(n)
	if n % 2 == 0:
		n1 = n - 1
		n2 = n + 1
		if n == 0:
			n1 = n + 1
	else:
		n1 = n
		n2 = n + 2
	ll = [abs(t - (h / 2 + c / 2)), abs(t - g(n1, h, c)), abs(t - g(n2, h, c))]
	if min(ll) == ll[0]:
		return 2
	if min(ll) == ll[1]:
		return n1
	if min(ll) == ll[2]:
		return n2

def g(n, h, c):
	return decimal.Decimal((decimal.Decimal((n + 1) / 2) * h + decimal.Decimal((n - 1) / 2) * c) / n)
for tc in range(int(input())):
	al = list(map(int, input().split()))
	print(f(al[0], al[1], al[2]))


import math
from decimal import *
T = int(input())

def f(j):
	a = Decimal((h + c) * (j // 2) + h * (j % 2)) / Decimal(j)
	return abs(a - t)
for i in range(T):
	(h, c, t) = map(int, input().split())
	if h == t:
		print(1)
	elif (h + c) // 2 == t:
		print(2)
	else:
		k = (h - t) // (2 * t - h - c)
		z = (c - t) // (h + c - 2 * t)
		ans = [1, 2, abs(2 * k + 1), abs(2 * k + 3), abs(2 * k - 1), abs(2 * z + 1), abs(2 * z + 3), abs(2 * z - 1)]
		res = 0
		for j in range(0, len(ans)):
			if f(ans[j]) <= f(ans[res]):
				res = j
		print(ans[res])


for _ in range(int(input())):
	p = 0
	(a, b, c) = map(int, input().split())
	d = []
	h = 0
	t = 0
	e = []
	if a <= c and b <= c:
		print(1)
	elif 2 * c - a - b <= 0:
		print(2)
	else:
		k = (a - c) // (2 * c - a - b)
		if abs(k * (a + b) + a - c * (2 * k + 1)) * (2 * k + 3) <= abs((k + 1) * (a + b) + a - c * (2 * k + 3)) * (2 * k + 1):
			print(2 * k + 1)
		else:
			print(2 * k + 3)


from fractions import Fraction as F
t = int(input())
for _ in range(t):
	(h, c, t) = map(int, input().split())
	if 2 * t - h - c == 0:
		k = 0
	else:
		k = (h - t) // (2 * t - h - c)
	t = F(t)

	def f(mid):
		return F(mid * (h + c) + h, 2 * mid + 1)
	(res, tmp) = (10 ** 100, F(10 ** 100))
	for i in range(k - 10, k + 10):
		if i < 0:
			continue
		dif = abs(t - f(i))
		if dif < tmp:
			tmp = dif
			res = 2 * i + 1
		elif dif == tmp:
			res = min(res, 2 * i + 1)
	for i in range(10):
		dif = abs(t - f(i))
		if dif < tmp:
			tmp = dif
			res = 2 * i + 1
		elif dif == tmp:
			res = min(res, 2 * i + 1)
	f = abs(t - F(h + c, 2))
	if f <= tmp:
		res = min(res, 2)
	print(res)


import math

def f(k, h, c, t):
	return (2 * k + 3) * abs(k * (h + c) + h - 2 * t * k - t) <= (2 * k + 1) * abs((k + 1) * (h + c) + h - 2 * t * k - 3 * t)
t = int(input())
for _ in range(t):
	ar = input().split()
	h = int(ar[0])
	c = int(ar[1])
	t = int(ar[2])
	if t == h:
		print(1)
	elif 2 * t <= h + c:
		print(2)
	else:
		z = (h - t) / (-h - c + 2 * t)
		x = math.floor(z)
		fuck = f(x, h, c, t)
		if fuck == 1:
			print(2 * x + 1)
		else:
			print(2 * x + 3)


T = int(input())
for _ in range(T):
	(h, c, t) = map(int, input().split())
	d = 10 ** 9
	if t <= (h + c) / 2:
		print(2)
		continue
	k = (h - t) // (2 * t - h - c)
	a = abs(k * (h + c) + h - (2 * k + 1) * t) * (2 * k + 3)
	b = abs((k + 1) * (h + c) + h - (2 * k + 3) * t) * (2 * k + 1)
	print([2 * k + 1, 2 * k + 3][a > b])


for test in range(int(input())):
	(h, c, t) = map(int, input().split())
	if h == t:
		print(1)
	elif t <= (h + c) / 2:
		print(2)
	elif abs(t - h) <= abs(t - (2 * h + c) / 3):
		print(1)
	else:
		x = (h - t) // (2 * t - h - c)
		y = x + 1
		dif2 = abs((2 * y + 1) * t - y * h - y * c - h)
		dif1 = abs((2 * x + 1) * t - x * h - x * c - h)
		if dif2 * (2 * x + 1) < dif1 * (2 * y + 1):
			print(2 * y + 1)
		else:
			print(2 * x + 1)


from fractions import Fraction as f

def answer():
	(h, c, t) = list(map(int, input().split()))
	if t <= (h + c) / 2:
		return 2
	else:
		if abs(t - h) <= abs(t - (h * 2 + c) / 3):
			return 1
		n = int((t - h) / (h + c - 2 * t))
		i = max(2, n - 2)
		while abs(t - f(h * i + c * (i - 1), i * 2 - 1)) > abs(t - f(h * (i + 1) + c * i, (i + 1) * 2 - 1)):
			i += 1
		return int(i * 2) - 1
for _ in range(int(input())):
	print(answer())


import math
q = int(input())
while q:
	q -= 1
	(h, c, t) = map(int, input().split())
	if t == h:
		print(1)
	elif t <= (h + c) / 2:
		print(2)
	else:
		k = int((h - t) / (2 * t - h - c))
		b = (2 * k + 3) * abs((k + 1) * h + k * c - t * (2 * k + 1))
		d = (2 * k + 1) * abs((k + 2) * h + (k + 1) * c - t * (2 * k + 3))
		if b <= d:
			print(2 * k + 1)
		else:
			print(2 * k + 3)


for i in range(int(input())):
	(h, c, t) = map(int, input().split())
	result = float('inf')
	avg = (h + c) / 2
	D = {}
	if t == h:
		result = 1
	elif t in (c, avg):
		result = 2
	else:
		D[abs(t - c)] = 2
		D[abs(t - h)] = 1
		if t - avg > 0:
			X = (h - avg) / (t - avg)
			if X < 3:
				X = (h - avg) / 3
				x = 3
			elif int(X) & 1 == 0:
				x = int(X) + 1
				X = (h - avg) / (int(X) + 1)
			else:
				x = int(X)
				X = (h - avg) / x
				X1 = abs(t - avg - (h - avg) / x)
				X2 = t - avg - (h - avg) / (x + 2)
				if X1 > X2:
					X = (h - avg) / (x + 2)
					x += 2
			X = t - avg - X
			if X != abs(t - h):
				D[X] = x
		elif t - avg < 0:
			X = abs(t - avg)
			D[X] = 2
		result = D[min(D.keys())]
	print(result)


for _ in range(int(input())):
	(h, c, t) = map(int, input().split())
	if t <= (h + c) / 2:
		print(2)
	else:
		n = (c - t) // (h + c - 2 * t)
		if abs(n * (h + c) - c - t * (2 * n - 1)) * (2 * n + 1) > abs((n + 1) * (h + c) - c - t * (2 * n + 1)) * (2 * n - 1):
			print(2 * n + 1)
		else:
			print(2 * n - 1)


import sys
import os
import heapq
import math
try:
	path = './file/input.txt'
	if os.path.exists(path):
		sys.stdin = open(path, 'r')
except:
	pass
T = int(input())

def printd(value):
	pass
for _ in range(T):
	arr = list(map(int, input().split(' ')))
	(h, c, t) = (arr[0], arr[1], arr[2])
	result = 1
	if t == h:
		result = 1
	elif t * 2 <= h + c:
		result = 2
	elif t * 3 >= h * 2 + c:
		result = 1 if abs(h * 3 - t * 3) <= abs(h * 2 + c - t * 3) else 3
	else:
		x = (t - c) / (2 * t - h - c)
		x = int(x)
		start = max(2, x - 5)
		top = 99999999999
		bottom = 1
		for i in range(start, start + 15):
			bottomi = abs(i * 2 - 1)
			topi = abs(h * i + c * (i - 1) - bottomi * t)
			if top * bottomi > topi * bottom:
				top = topi
				bottom = bottomi
				result = i * 2 - 1
	print(result)


from fractions import Fraction
from math import floor, ceil

def f(h, c, x):
	return Fraction(h * (x + 1), x * 2 + 1) + Fraction(c * x, x * 2 + 1)

def solve():
	(h, c, t) = [int(x) for x in input().split()]
	a = h + c
	d1 = Fraction(h + c, 2)
	if h + c >= t * 2:
		print(2)
		return
	if t >= h:
		print(1)
		return
	x = Fraction(t - h, h + c - t * 2)
	if x < 0:
		x = 0
	d2 = f(h, c, floor(x))
	d3 = f(h, c, ceil(x))
	dif1 = abs(d1 - t)
	dif2 = abs(d2 - t)
	dif3 = abs(d3 - t)
	dm = min(dif1, dif2, dif3)
	if dm == dif1:
		print(2)
	elif dm == dif2:
		print(2 * floor(x) + 1)
	else:
		print(2 * ceil(x) + 1)
t = int(input())
for i in range(t):
	solve()


from decimal import *
getcontext().prec = 28

def solve():
	if h == c:
		return 1
	if (h + c) // 2 >= t:
		print(2)
		return
	ans = bs(1, 10 ** 6)
	a1 = getdif(ans)
	a2 = getdif(ans - 1)
	if abs(t - a1) < abs(t - a2):
		print(2 * ans - 1)
	else:
		ans -= 1
		print(2 * ans - 1)
	return

def bs(l, r):
	while l < r:
		m = (l + r) // 2
		if check(m):
			r = m
		else:
			l = m + 1
	return r

def check(hh):
	temp = getdif(hh)
	if temp < t:
		return 1
	else:
		return 0

def getdif(hh):
	return Decimal(hh * h + (hh - 1) * c) / Decimal(2 * hh - 1)
T = int(input())
for _ in range(T):
	(h, c, t) = [int(i) for i in input().split()]
	solve()


def main():
	from decimal import Decimal
	import sys
	input = sys.stdin.readline
	sys.setrecursionlimit(10 ** 6)
	T = int(input())
	for _ in range(T):
		(h, c, t) = [Decimal(x) for x in input().strip().split()]
		avg = (h + c) / 2
		if h == t:
			print(1)
			continue
		elif avg >= t:
			print(2)
			continue
		(l, r) = (Decimal(1), Decimal(10 ** 9))

		def calc(m):
			return Decimal((m * h + (m - 1) * c) / (2 * m - 1))
		while l + 1 < r:
			m = Decimal((l + r) // 2)
			if calc(m) >= t:
				l = m
			else:
				r = m
		if abs(calc(l) - t) <= abs(calc(r) - t):
			print(2 * l - 1)
		else:
			print(2 * r - 1)
main()


from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect, math, heapq, sys, io, os, time
from decimal import Decimal
start_time = time.time()
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
	input = sys.stdin.readline
if not ONLINE_JUDGE:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
alphabet = 'abcdefghijklmnopqrstuvwxyz'
from fractions import Fraction as f
for tc in range(int(input())):
	(H, C, T) = map(int, input().split())
	ans = f(H + C, 2)
	cups = 2
	if abs(H - T) <= abs(ans - T):
		ans = H
		cups = 1
	if H + C != 2 * T:
		n = (T - H) // (H + C - 2 * T)
		itr = max(0, n - 3)
		while itr <= n + 3:
			(a, b) = (itr + 1, itr)
			temp = f(a * H + b * C, a + b)
			if abs(temp - T) < abs(ans - T):
				ans = temp
				cups = a + b
			itr += 1
	print(cups)
if not ONLINE_JUDGE:
	print('Time Elapsed :', time.time() - start_time, 'seconds')
sys.stdout.close()


import math

def bs(H, C, res):
	lo = 0
	hi = 10 ** 12
	ans = 0
	while lo <= hi:
		mid = (lo + hi) // 2
		if H * (mid + 1) + mid * C >= res * (2 * mid + 1):
			lo = mid + 1
			ans = mid
		else:
			hi = mid - 1
	return ans

def main():
	for q in range(int(input())):
		(H, C, T) = map(int, input().split())
		avg = (H + C) / 2
		if T <= avg:
			print('2')
		else:
			ans = bs(H, C, T)
			ab1 = abs(T * (2 * ans + 1) - H * (ans + 1) - C * ans)
			ab2 = abs(T * (2 * ans + 3) - H * (ans + 2) - C * (ans + 1))
			ab1 /= 2 * ans + 1
			ab2 /= 2 * ans + 3
			if ab1 <= ab2:
				print(2 * ans + 1)
			else:
				print(2 * ans + 3)
main()


import sys
import math as mt
from decimal import *
getcontext().prec = 50
input = sys.stdin.buffer.readline

def cal(i, c, h):
	return Decimal(i * (c + h) + h) / Decimal(2 * i + 1)
t = int(input())
for __ in range(t):
	(h, c, temp) = map(int, input().split())
	if temp <= (h + c) / 2:
		print(2)
	else:
		y = mt.floor((temp - h) / (c + h - 2 * temp))
		if abs(cal(y, c, h) - temp) <= abs(cal(y + 1, c, h) - temp):
			print(2 * y + 1)
		else:
			y += 1
			print(2 * y + 1)


import sys
import math
import collections
from collections import deque
from functools import reduce
from sys import stdin, stdout, setrecursionlimit
setrecursionlimit(2 ** 20)

def factors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))
for _ in range(int(stdin.readline())):
	(h, c, t) = list(map(int, stdin.readline().split()))
	if h == t:
		print(1)
	elif t <= (h + c) / 2:
		print(2)
	else:
		k = (t - c - 1) // (2 * t - h - c)
		ans = 2 * k + 1
		if (4 * k * k - 1) * (2 * t - h - c) >= 2 * (h - c) * k:
			ans -= 2
		print(ans)


import os
import sys
from io import BytesIO, IOBase
from decimal import Decimal, getcontext
getcontext().prec = 40

def iin():
	return int(input())

def lin():
	return list(map(Decimal, input().split()))
from types import GeneratorType

def bootstrap(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to
	return wrappedfunc

def main():
	T = iin()
	for _ in range(T):
		(h, c, t) = lin()
		ans = [[abs(h - t), 1]]
		md = (h + c) / 2
		ans.append([abs(md - t), 2])
		if md < t:
			(l, r) = (Decimal(1), Decimal(10 ** 6))
			ch = 0
			while l < r:
				if ch > 5:
					break
				x = (l + r) // 2
				x1 = 2 * x - 1
				a1 = (x * h + (x - 1) * c) / x1
				ans.append([abs(a1 - t), x1])
				if a1 < t:
					r = x
				elif a1 > t:
					l = x
				else:
					break
				if r - l <= 1:
					ch += 1
		ans.sort()
		mn = ans[0]
		print(mn[1])
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
main()


from decimal import Decimal

def solve():
	(h, c, t) = [int(x) for x in input().split()]
	if h == t:
		print(1)
		return
	a = 2 * t - h - c
	b = h - t
	if a <= 0:
		print(2)
		return
	else:
		c1 = b // a
		c2 = c1 + 1
		tc1 = Decimal(h * (c1 + 1) + c * c1) / Decimal(2 * c1 + 1)
		tc2 = Decimal(h * (c2 + 1) + c * c2) / Decimal(2 * c2 + 1)
		(try1, try2) = (abs(tc1 - t), abs(tc2 - t))
		if try1 <= try2:
			print(2 * c1 + 1)
		else:
			print(2 * c2 + 1)
t = int(input())
for i in range(t):
	solve()


from decimal import *
getcontext().prec = 28
n = int(input())
for i in range(n):
	(h, c, t) = list(map(int, input().split()))
	if (2 * h + c) / 3 < t <= h:
		if abs(t - (2 * h + c) / 3) < abs(t - h):
			print(3)
		else:
			print(1)
	elif (h + c) / 2 >= t:
		print(2)
	else:
		k = (h - t) // (2 * t - (h + c))
		num = num1 = abs(t - Decimal(h * (k + 1) + c * k) / Decimal(2 * k + 1))
		k1 = k + 1
		num1 = abs(t - Decimal(h * (k1 + 1) + c * k1) / Decimal(2 * k1 + 1))
		if num <= num1:
			print(2 * k + 1)
		else:
			print(2 * k1 + 1)