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

K=n//(a+b)

J=n%(a+b)

if J<=a:

    print((K*a+J))

else:

    print((K*a+a))
n,a,b=list(map(int,input().split()))



print((a*(n//(a+b))+min(a,n%(a+b))))

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

n, a, b = list(map(int, input().split()))
print((a * (n // (a + b)) + min(a, n % (a + b))))

-K = n // (a + b) -J = n % (a + b) -if J <= a: -    print((K * a + J)) -else: -    print((K * a + a)) +print((a * (n // (a + b)) + min(a, n % (a + b))))