Problem:
 Score : 100 points    Problem Statement ButCoder Inc. runs a programming competition site called ButCoder . In this site, a user is given an integer value called rating that represents his/her skill, which changes each time he/she participates in a contest. The initial value of a new user's rating is 0 , and a user whose rating reaches K or higher is called Kaiden ("total transmission"). Note that a user's rating may become negative.  Hikuhashi is a new user in ButCoder. It is estimated that, his rating increases by A in each of his odd-numbered contests (first, third, fifth, ...), and decreases by B in each of his even-numbered contests (second, fourth, sixth, ...).  According to this estimate, after how many contests will he become Kaiden for the first time, or will he never become Kaiden?      Constraints  1 ≤ K, A, B ≤ 10^{18}  All input values are integers.         Input Input is given from Standard Input in the following format:  K  A  B       Output If it is estimated that Hikuhashi will never become Kaiden, print -1 . Otherwise, print the estimated number of contests before he become Kaiden for the first time.        Sample Input 1 4000 2000 500      Sample Output 1 5  Each time Hikuhashi participates in a contest, his rating is estimated to change as 0 → 2000 → 1500 → 3500 → 3000 → 5000 → … After his fifth contest, his rating will reach 4000 or higher for the first time.       Sample Input 2 4000 500 2000      Sample Output 2 -1  Each time Hikuhashi participates in a contest, his rating is estimated to change as 0 → 500 → -1500 → -1000 → -3000 → -2500 → … He will never become Kaiden.       Sample Input 3 1000000000000000000 2 1      Sample Output 3 1999999999999999997  The input and output values may not fit into 32 -bit integers.

Solution (Python):
K, A, B = map(int, input().split())

if A >= K:
    print(1)
    exit()

if A - B <= 0:
    print(-1)
    exit()

up = A - B
cnt = (K - A + up - 1) // up
print(1 + 2 * cnt)

Solution (Python):
from decimal import *
import math
K,A,B=map(int,input().split())
if A>=K:
  print(1)
elif A-B>0:
  print(1+math.ceil(Decimal(K-A)/Decimal(A-B))*2)
else:
  print(-1)

Solution (Python):
K, A, B = map(int, input().split())

if A >= K:
  print(1)
else:
  if A-B <= 0:
    print(-1)
  else:
    S = -(-(K-A)//(A-B))
    print(S*2+1)

Solution (Python):
ceil = lambda a, b: -(-a // b)

K, A, B = map(int, input().split())
if A >= K:
    print(1)
    exit()
p = A - B
if p <= 0:
    print(-1)
    exit()

ans = 1
ans += ceil(K - A, A - B) * 2
print(ans)

Solution (Python):
k,a,b = map(int, input().split())
inc_two = a - b
if inc_two > 0:
    k -= a
    print(1 + 2 * ((k + inc_two - 1) // inc_two))
else:
    if a >= k:
        print(1)
    else:
        print(-1)

Solution (Python):
k, a, b = map(int, input().split())
if a >= k:
    print(1)
elif a <= b:
    print(-1)
else:
    print(((k - a - 1) // (a - b) + 1 ) * 2 + 1)

Solution (Python):
k,a,b=map(int,input().split())
if a>=k:
    print(1)
elif a<=b:
    print(-1)
else:
    print(-(-(k-a)//(a-b))*2+1)

Solution (Python):
k, a, b = map(int, input().split())
if a >= k:
  print(1)
else:
  if a <= b:
    print(-1)
  else:
    r = -(-(k-a) // (a-b))
    print(2*r+1)

Solution (Python):
import math
K,A,B=map(int,input().split())
if A>=K:
    print(1)
else:
    if A<=B:
        print(-1)
    else:
        if (K-A)%(A-B)==0:
            print((K-A)//(A-B)*2+1)
        else:
            print((K-A)//(A-B)*2+3)

Solution (Python):
k, a, b = map(int, input().split())
if a >= k:
  print(1)
else:
  if a <= b:
    print(-1)
  else:
    r = -(-(k-a) // (a-b))
    print(2*r+1)

Solution (Python):
k, a, b = map(int, input().split())

if a <= b:
    if a < k:
        print(-1)
    else:
        print(1)
else:
    if a > k:
        print(1)
    else:
        answer = ((k - b - 1) // (a - b) * 2) + 1
        print(answer)

Solution (Python):
k, a, b = map(int, input().split())
if a >= k:
  print(1)
else:
  if a <= b:
    print(-1)
  else:
    r = -(-(k-a) // (a-b))
    print(2*r+1)

Solution (Python):
def main():
    k,a,b=map(int,input().split())
    if a<=b:
        if a>=k:
            print(1)
        else:
            print(-1)
        return
    print(((k-b-1)//(a-b)+1)*2-1)
    
    
main()

Solution (Python):
x,a,b = map(int,input().split())
l = -1
r = 10**18+1
while r - l > 1 :
	c = (r + l) // 2
	sum = (a - b) * c + a
	if sum >= x : r = c
	else : l = c
if x <= a : print(1)
elif r != 10**18+1 : print(2 * r + 1)
else : print(-1)

Solution (Python):
k,a,b=map(int,input().split())
ans=0
k-=a
if k<=0:
  print(1)
elif a-b<=0:
  print(-1)
else:
  print(2*((k-1)//(a-b)+1)+1)

Solution (Python):
K, A, B = map(int, input().split())
if A >= K:
  r = 1
elif B >= A:
  r = -1
else:
  r = (K-A +A-B-1)//(A-B)*2+1
print(r)

Solution (Python):
K,A,B=map(int,input().split())
if A>=K:
  print(1)
elif A<=B:
  print(-1)
else:
  bef=((K-A)//(A-B))+((K-A)%(A-B)!=0)
  print(2*bef+1)

Solution (Python):


import sys

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')
sys.setrecursionlimit(10 ** 7)
INF = 10 ** 18
MOD = 10 ** 9 + 7

K, A, B = MAP()


if B >= A:
    
    if A >= K:
        print(1)
    else:
        print(-1)
else:
    
    x = ceil((K-A), (A-B))
    
    print(x*2+1)

Solution (Python):

import sys
sys.setrecursionlimit(10**8)
input = sys.stdin.readline

k, a, b = [int(item) for item in input().split()]
if a >= k:
    print(1)
    exit()
if abs(a) - abs(b) <= 0:
    print(-1)
    exit()
diff = abs(a) - abs(b)
print(1 + (k - a + diff - 1) // diff * 2)

Solution (Python):
def main():
    K, A, B = map(int, input().split())
    if K <= A: return 1
    if B >= A: return -1
    d = A-B
    K -= A
    if(K % d == 0): return 2 * (K//d) + 1
    return (K // d + 1) * 2 + 1

if __name__ == '__main__':
    print(main())

Solution (Python):
k, a, b = [ int(v) for v in input().split() ]

if a >= k:
    ans = 1
elif b >= a:
    ans = -1
else:
    ans = 1 + ( ( k - b - 1 ) // (a - b) ) * 2
print(ans)

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor


INF = float('inf')
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LIM(): return list(map(lambda x:int(x) - 1, sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def LIRM(n): return [LIM() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
mod = 1000000007



k, a, b = LI()
if k <= a:
    print(1)
else:
    if b >= a:
        print(-1)
    else:
        print(1 + ((k - a - 1) // (a - b) + 1) * 2)

Solution (Python):
k,a,b = map(int, input().split())
if k <= a:
  print(1)
elif b >= a:
  print(-1)
else:
  print(((k-a-1)//(a-b)+1)*2+1)

Solution (Python):
K, A, B = map(int, input().split())
if K <= A:
    print(1)
else:
    if A <= B:
        print(-1)
    else:
        K -= A
        print(1 + 2 * (K // (A - B) + int(K % (A - B) != 0)))

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

K,A,B = map(int,input().split())

if K <= A:
    answer = 1
else:
    if A-B <= 0:
        answer = -1
    else:
        d = A-B
        x = K-A
        x += (-x)%d
        answer = 2 * x//d + 1
print(answer)

Solution (Python):
def main():
    K, A, B = map(int, input().split())
    if K <= A:
        print(1)
        return
    if A <= B:
        print(-1)
        return
    ans = max(0, -(-(K-A)//(A-B))) * 2 + 1
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
k, a, b = map(int, input().split())
if a < k and b >= a:
  print('-1')
elif a >= k:
  print('1')
else:
  ans = k // (a - b) * 2 - 4
  while ans // 2 * a - ans // 2 * b + b < k:
    ans += 2
  print(ans - 1)

Solution (Python):
g,a,b=map(int,input().split())
if g<=a:
  print(1)
else:
  if a<=b:
    print(-1)
  else:
    if (g-a)%(a-b)==0:
      print(2*((g-a)//(a-b))+1)
    else:
      print(2*((g-a)//(a-b)+1)+1)

Solution (Python):
k, a, b = map(int, input().split())
k = max(0, k - a)
if k > 0 and a <= b:
  print(-1)
elif a == b:
  print(1)
else:
  print((k // (a - b) + int(k % (a - b) != 0)) * 2 + 1)

Solution (Python):
K, A, B = map(int, input().split())

if A >= K:
    print(1)
else:
    if A-B <= 0:
        print(-1)
    else:
        print(-(-(K-A) // (A-B))*2+1)

Solution (Python):
k,a,b=map(int,input().split());print(1+2*((k-a-1)//(a-b)+1)if a-b>0 else(1 if k<=a else -1))

Solution (Python):
import math
K,A,B = map(int,input().split())
if A <= B:
  if K > A:
    print(-1)
  else:
    print(1)
else:
  n = (K-A)//(A-B)
  if n <= 0:
    print(1)
  else:
    if (A-B)*n+A >= K:
      print(2*n+1)
    else:
      print(2*n+3)

Solution (Python):
K, A, B = map(int, input().split())
if A <= B and K > A:
    print(-1)
elif A >= K:
    print(1)
else:
    print(1 - int(- (K-A) // (A-B))*2)

Solution (Python):
p,a,b = map(int,input().split())
if(a<=b):
  if(a>=p):
    print(1)
  else:
  	print(-1)
else:
  p-=a
  up=a-b
  if(p<=0):
    print(1)
  else:
  	num=p//up+(p%up!=0)
  	print(num*2+1)

Solution (Python):
k,a,b=map(int,input().split())
if k<=a:
    print(1)
elif a-b <= 0:
    print(-1)
else:
    print(1+(k-a+(a-b)-1)//(a-b)*2)

Solution (Python):
k,a,b=map(int,input().split())
print(1 if k<=a else 1+(k-b-1)//(a-b)*2 if a>b else -1)

Solution (Python):
k, a, b = map(int, raw_input().split())
if k <= a or a <= b:
    print [-1, 1][k <= a]
else:
    print (k - b - 1) / (a - b) * 2 + 1

Solution (Python):
k, a, b = map(int, raw_input().split())
if k <= a or a <= b:
    print [-1, 1][k <= a]
else:
    print (k - b - 1) / (a - b) * 2 + 1

Solution (Python):
from math import ceil
k,a,b=map(int,input().split())
if k<=a:
  print(1)
elif a>b:
  print(1+(k-b-1)//(a-b)*2)
else:
  print(-1)

Solution (Python):
k, a, b = map(int, raw_input().split())
if a >= k:
	print 1
elif a <= b:
	print -1
else:
	print 1 + (k - b - 1) / (a - b) * 2

Solution (Python):
def getinputdata():

    
    array_result = []
    
    data = input()

    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result

arr_data = getinputdata()

k = int(arr_data[0][0])
a = int(arr_data[0][1])
b = int(arr_data[0][2])

cnt = a - b

rate = a

if rate >= k:
    
    print(1)
    
elif cnt==0:

    print(-1)
else:
    
    if (k-rate) % cnt == 0:
        
        num = (k-rate) // cnt 
        
        print(1+ num*2)
    
    else:
        
        num = ((k-rate) // cnt) + 1
        
        if num>=1 :
        
            print(num*2+1)
        
        else:
            
            print(-1)

Solution (Python):
k,a,b = (int(i) for i in input().split())
num = k-a
if num<=0: print(1)
elif a<=b: print(-1)
else: print(((num-num%(a-b))//(a-b))*2+2*(min(1,num%(a-b)))+1)

Solution (Python):
k, a, b = map(int, input().split())
if a < k and b >= a:
  print('-1')
elif a >= k:
  print('1')
else:
  ans = k // (a - b) * 2 - 4
  while ans // 2 * a - ans // 2 * b + b < k:
    ans += 2
  print(ans - 1)

Solution (Python):
K, A, B = [int(i) for i in input().split()]
if(K <= A):
    print(1)
else:
    if(A-B <= 0):
        print(-1)
    else:
        print(1+(K-B-1)//(A-B)*2)

Solution (Python):
K, A, B = [int(i) for i in input().split()]
if(K <= A):
    print(1)
else:
    if(A-B <= 0):
        print(-1)
    else:
        print(1+(K-B-1)//(A-B)*2)

Solution (Python):
K, A, B = map(int, raw_input().split())
if K <= A:
    print 1
elif A <= B:
    print -1
else:
    print (K-B-1)/(A-B)*2+1

Solution (Python):
K, A, B = map(int, input().split())
if A >= K:
    print("1")
    exit()

if B >= A:
    print("-1")
    exit()

ans = ((K - A - 1) // (A - B) + 1) * 2 + 1
print(ans)

Solution (Python):
import decimal

from math import ceil


def solve(k, a, b):
    if k <= a:
        return 1
    if a <= b:
        return -1
    ka = decimal.Decimal(k - a)
    ab = decimal.Decimal(a - b)
    return ceil(ka / ab) * 2 + 1


print(solve(*map(int, input().split())))

Solution (Python):

from decimal import *
import math
k,a,b = map(int, input().split())
if a >= k:
    print(1)
else:
    if a <= b:
        print(-1)
    else:
        print(2*math.ceil(Decimal(k-a)/Decimal(a-b))+1)

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
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 M(n): return ModInt(n)
def MI(): return M(I())


def main():
    k,a,b = LI()
    if k <= a:
        return 1
    if a <= b:
        return -1
    t = a-b
    r = int((k-a) / t)
    for i in range(r-10,r+10):
        if i*t + a >= k:
            return i*2+1

    return -1



print(main())

Solution (Python):
K, A, B = map(int, input().split())
if K <= A :
   print ('1')
elif A <= B :
   print ('-1')
else :
   delta = A - B
   ans = (K - A + delta - 1) // delta * 2 + 1
   print ('%ld' % ans)

Solution (Python):
import sys
import math
K, A, B = list(map(int, input().split()))
 
if (A >= K):
    print('1')
    sys.exit()
elif (A - B) <= 0:
    print('-1')
    sys.exit()
d = A-B
p = K-A
q = p//d
if ((p % d) != 0):
    q += 1
print(int(2*q + 1))

Solution (Python):
import math
from decimal import *

numbers = [int(i) for i in input().split()]

diff = numbers[1] - numbers[2]

if numbers[0] <= numbers[1]:
    print("1")
elif diff <= 0:
    print("-1")
else:
    print(math.ceil(Decimal(numbers[0] - numbers[1]) / diff) * 2 + 1)

Solution (Python):
import sys
import math
K, A, B = list(map(int, input().split()))
 
if (A >= K):
    print('1')
    sys.exit()
elif (A - B) <= 0:
    print('-1')
    sys.exit()
d = A-B
p = K-A
q = int(p//d)
if ((p % d) != 0):
    q += 1
print(str(2*q + 1))

Solution (Python):
import math

k, a, b = map(int, input().split())
inc = a - b
if k <= a:
    print(1)
elif inc < 0:
    if k <= a:
        print(1)
    else:
        print(-1)
elif inc == 0:
    print(-1)
else:
    from decimal import *
    getcontext().prec = 500
    print(math.ceil(Decimal(k-a) / Decimal(inc))*2+1)

Solution (Python):


K, A, B = map(int, raw_input().split())
if K <=A:
    print 1

elif A <= B:
    print -1
else:
    x = (K-B-1)/(A-B)+1
    print 2*x-1

Solution (Python):
if __name__ == "__main__":
    K,A,B = map(int, input().split())
    left = 0
    right = 2 ** 100
    if A >= K:
        print (1)
        exit()
    if B >= A:
        print (-1)
        exit()
    while (right - left > 1):
        med = (right + left) // 2
        res = (A - B) * med
        if res >= K:
            right = med
        else:
            left = med
    
    res = 2 * right
    for x in range(max(1, res - 100), res+10):
        a1 = x // 2
        a2 = x - a1
        tmp = A * a2 - B * a1
        if tmp >= K:
            print (x)
            exit()

Solution (Python):

k, a, b = list(map(int,input().split()))

d = a-b
if(a>=k):
    print(1)
elif(d<=0):
    print(-1)
else:
    if((k-a)%d == 0):
        print((2*(k-a)//d)+1)
    else:
        print((2*((k-a)//d+1))+1)

Solution (Python):
k, a, b = map(int, input().split())
if a <= b:
    print(1 if k <= a else -1)
else:
    print(min((k+a-b-1)//(a-b)*2, (k-a+a-b-1)//(a-b)*2+1))

Solution (Python):
K,A,B=map(int,input().split())
if A>=K: print(1)
elif A-B<=0: print(-1)
else: 
  n = (K-A-1) // (A-B) + 1
  print(2*n +1)

Solution (Python):
def main():
    K, A, B = map(int, input().split())

    if A >= K:
        print(1)
        exit()
    elif A <= B:
        print(-1)
        exit()

    n, m = divmod(K - A, A - B)
    ans = n * 2 + 1
    a = -A
    b = B
    while m > 0:
        m += b
        a, b = b, a
        ans += 1
    print(ans)

main()

Solution (Python):
K,A,B = map(int,input().split())
if A >= K:
    print(1)
elif A > B:
    
    n = (K-A-1) // (A-B) + 1
    print(2*n + 1)
else:
    print(-1)

Solution (Python):

def solve(k, a, b):
    if a - b <= 0:
        if k <= a:
            return 1
        else:
            return -1
    return 1 + (k - a + (a - b) - 1) // (a - b) * 2
k, a, b = map(int, input().split())
print(solve(k, a, b))

Solution (Python):
K, A, B = map(int, raw_input().split())

if A >= K:
    print 1
    exit()
if A <= B:
    print -1
    exit()

x = (K-B-1)/(A-B)+1
print 2*x-1