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

c = a + b

if n % c == 0:

    ans = a * (n // c)

elif n % c <= a:

    ans = a * (n // c) + n % c

else:

    ans = a * (n // c +1)



print(ans)

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

t=a+b

if n%t<=a:

    diff=n%t

else:

    diff=a

print((a*(n//t)+diff))
n, a, b = list(map(int, input().split()))
c = a + b
if n % c == 0:
    ans = a * (n // c)
elif n % c <= a:
    ans = a * (n // c) + n % c
else:
    ans = a * (n // c + 1)
print(ans)

n, a, b = list(map(int, input().split()))
t = a + b
if n % t <= a:
    diff = n % t
else:
    diff = a
print((a * (n // t) + diff))

-c = a + b -if n % c == 0: -    ans = a * (n // c) -elif n % c <= a: -    ans = a * (n // c) + n % c +t = a + b +if n % t <= a: +    diff = n % t -    ans = a * (n // c + 1) -print(ans) +    diff = a +print((a * (n // t) + diff))