

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

ans = 0

c = n % (a + b)



if a == 0 and b == 0:

    print((0))

else:

    ans = int(n / (a + b)) * a

    if 0 <= c <= a:

        print((ans + c))

    elif a <= c <= a + b:

        print((ans + a))

    else:

        print("What??")



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



x = n // (a+b)

y = n % (a+b)



if y <= a:

    print(((x*a) + y))

else:

    print(((x*a) + a))

n, a, b = list(map(int, input().split()))
ans = 0
c = n % (a + b)
if a == 0 and b == 0:
    print((0))
else:
    ans = int(n / (a + b)) * a
    if 0 <= c <= a:
        print((ans + c))
    elif a <= c <= a + b:
        print((ans + a))
    else:
        print("What??")

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

-ans = 0 -c = n % (a + b) -if a == 0 and b == 0: -    print((0)) +x = n // (a + b) +y = n % (a + b) +if y <= a: +    print(((x * a) + y)) -    ans = int(n / (a + b)) * a -    if 0 <= c <= a: -        print((ans + c)) -    elif a <= c <= a + b: -        print((ans + a)) -    else: -        print("What??") +    print(((x * a) + a))