N, A, B = [int(x) for x in input().strip().split()]

p = N // (A + B) * A

q = N % (A + B)

if q > A:

    q = A

print((p + q))

"""

    Author: _YL_

"""

# b:blue, r:red

n, b, r = list(map(int, input().split()))



if b == 0:

    print("0")

elif r == 0:

    print(n)

else:

    remainder = n % (b+r)

    if remainder > b:

        remainder = b



    print((n//(b+r)*b+remainder))
N, A, B = [int(x) for x in input().strip().split()]
p = N // (A + B) * A
q = N % (A + B)
if q > A:
    q = A
print((p + q))

"""
    Author: _YL_
"""
# b:blue, r:red
n, b, r = list(map(int, input().split()))
if b == 0:
    print("0")
elif r == 0:
    print(n)
else:
    remainder = n % (b + r)
    if remainder > b:
        remainder = b
    print((n // (b + r) * b + remainder))

-N, A, B = [int(x) for x in input().strip().split()] -p = N // (A + B) * A -q = N % (A + B) -if q > A: -    q = A -print((p + q)) +""" +    Author: _YL_ +""" +# b:blue, r:red +n, b, r = list(map(int, input().split())) +if b == 0: +    print("0") +elif r == 0: +    print(n) +else: +    remainder = n % (b + r) +    if remainder > b: +        remainder = b +    print((n // (b + r) * b + remainder))