import math

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

x = math.floor(N/(A+B))

ans = x*A

N = N-(A+B)*x

if N > A:

    ans = ans+A

else:

    ans = ans+N

print(ans)

def LI():

    return list(map(int, input().split()))





N, A, B = LI()

x = N//(A+B)

y = N-A*x-B*x

if y >= A:

    ans = (x+1)*A

else:

    ans = x*A+y

print(ans)

import math

N, A, B = list(map(int, input().split()))
x = math.floor(N / (A + B))
ans = x * A
N = N - (A + B) * x
if N > A:
    ans = ans + A
else:
    ans = ans + N
print(ans)

def LI():
    return list(map(int, input().split()))


N, A, B = LI()
x = N // (A + B)
y = N - A * x - B * x
if y >= A:
    ans = (x + 1) * A
else:
    ans = x * A + y
print(ans)

-import math +def LI(): +    return list(map(int, input().split())) -N, A, B = list(map(int, input().split())) -x = math.floor(N / (A + B)) -ans = x * A -N = N - (A + B) * x -if N > A: -    ans = ans + A + +N, A, B = LI() +x = N // (A + B) +y = N - A * x - B * x +if y >= A: +    ans = (x + 1) * A -    ans = ans + N +    ans = x * A + y