N, A, B = map(int , input().split())
 
L = []
i = 0
k = 0
j = 0
P = N // (A + B)
Q = N % (A + B)

if A > Q:
    print((P * A) + Q)
else:
    print((P * A) + A)
 
8db764d4258362a450ba94152045a912f4377361
<mask token>

<mask token>
if A > Q:
    print(P * A + Q)
else:
    print(P * A + A)

N, A, B = map(int, input().split())
L = []
i = 0
k = 0
j = 0
P = N // (A + B)
Q = N % (A + B)
if A > Q:
    print(P * A + Q)
else:
    print(P * A + A)

N, A, B = map(int , input().split())
 
L = []
i = 0
k = 0
j = 0
P = N // (A + B)
Q = N % (A + B)

if A > Q:
    print((P * A) + Q)
else:
    print((P * A) + A)
 