Buggy python submission (verdict: Time Limit Exceeded):
import sys

N,A,B = map(int,input().split(' '))

Result = 0
Count_Blue = 0
if 1<=N<=10**18 and A >= 0 and B >= 0 and \
   0< A + B <= 10**18:
    for Count in range(10**100):
        Result = Result + (1 * A)
        Count_Blue += (1 * A)
        if Result > N:
            Count_Blue = Count_Blue - (Result - N)
            print(Count_Blue)
            sys.exit()
        Result = Result + (1 * B)
        if Result > N:
            print(Count_Blue)
            sys.exit()

Fixed submission:
import sys

N,A,B = map(int,input().split(' '))

Count_Blue = 0
if 1<=N<=10**18 and A > 0 and B >= 0 and \
   0< A + B <= 10**18:
    Add_Blue = 1 * A
    Add_Both = Add_Blue + 1 * B

    q = N // Add_Both
    mod = N % Add_Both
    if mod < Add_Blue:
        Count_Blue = (q *Add_Blue) + mod
    else:
        Count_Blue = (q * Add_Blue) + Add_Blue
    print(Count_Blue)
elif A == 0:
    print(Count_Blue)

Buggy python submission (verdict: Time Limit Exceeded):
import sys

N,A,B = map(int,input().split(' '))

Result = 0
Count_Blue = 0
if 1<=N<=10**18 and A >= 0 and B >= 0 and \
   0< A + B <= 10**18:
    for Count in range(1,10**100+1):
        for i in range(A):
            if Result < N:
                Result = Result + 1
                Count_Blue += 1
            else:
                print(Count_Blue)
                sys.exit()
        Result = Result + 1 * B

        if Result > N:
            print(Count_Blue)
            sys.exit()

Fixed submission:
import sys

N,A,B = map(int,input().split(' '))

Count_Blue = 0
if 1<=N<=10**18 and A > 0 and B >= 0 and \
   0< A + B <= 10**18:
    Add_Blue = 1 * A
    Add_Both = Add_Blue + 1 * B

    q = N // Add_Both
    mod = N % Add_Both
    if mod < Add_Blue:
        Count_Blue = (q *Add_Blue) + mod
    else:
        Count_Blue = (q * Add_Blue) + Add_Blue
    print(Count_Blue)
elif A == 0:
    print(Count_Blue)

Buggy python submission (verdict: Time Limit Exceeded):
import sys

N,A,B = map(int,input().split(' '))

Result = 0

Count_Blue = 0
if 1<=N<=10**18 and A >= 0 and B >= 0 and \
   0< A + B <= 10**18:
    for Count in range(1,10**100+1):
        if Result < N:
            Mod = Count % 2
            if Mod==1:
                for i in range(A):
                    if Result < N:
                        Result = Result + 1
                        Count_Blue += 1
            elif Mod==0:
                Result = Result + 1 * B
        else:
            print(Count_Blue)
            sys.exit()

Fixed submission:
import sys

N,A,B = map(int,input().split(' '))

Count_Blue = 0
if 1<=N<=10**18 and A > 0 and B >= 0 and \
   0< A + B <= 10**18:
    Add_Blue = 1 * A
    Add_Both = Add_Blue + 1 * B

    q = N // Add_Both
    mod = N % Add_Both
    if mod < Add_Blue:
        Count_Blue = (q *Add_Blue) + mod
    else:
        Count_Blue = (q * Add_Blue) + Add_Blue
    print(Count_Blue)
elif A == 0:
    print(Count_Blue)

Buggy python submission (verdict: Runtime Error):
import sys

N,A,B = map(int,input().split(' '))

Result = ''

Count_Blue = 0
if 1<=N<=10**18 and A >= 0 and B >= 0 and \
   0< A + B <= 10**18:
    for Count in range(1,10**100+1):
        if len(Result) < N:
            Mod = Count % 2
            if Mod==1:
                for i in range(A):
                    if len(Result) < N:
                        Result = Result + 'B'
                        Count_Blue += 1
            elif Mod==0:
                Result = Result + 'R' * B
        else:
            print(Count_Blue)
            sys.exit()



Fixed submission:
import sys

N,A,B = map(int,input().split(' '))

Count_Blue = 0
if 1<=N<=10**18 and A > 0 and B >= 0 and \
   0< A + B <= 10**18:
    Add_Blue = 1 * A
    Add_Both = Add_Blue + 1 * B

    q = N // Add_Both
    mod = N % Add_Both
    if mod < Add_Blue:
        Count_Blue = (q *Add_Blue) + mod
    else:
        Count_Blue = (q * Add_Blue) + Add_Blue
    print(Count_Blue)
elif A == 0:
    print(Count_Blue)