n, a, b = [int(x) for x in input().split()]



if a == 0 and b == 0:

    print("0")

elif a >= n:

    print(n)

else:

    x = n // (a + b)

    if x == 0:

        print(a)

    else:

        if (n - ((a + b) * x)) >= a:

            print((a * x + a))

        else:

            print((a * x + (n - (a + b) * x)))

n, a, b = [int(x) for x in input().split()]



if a == 0 and b == 0:

    print("0")

elif a >= n:

    print(n)

else:

    x = n // (a + b)

    if x == 0:

        print(a)

    else:

        if (n - ((a + b) * x)) >= a:

            print((a * x + a))

        else:

            print((n - b * x))

n, a, b = [int(x) for x in input().split()]
if a == 0 and b == 0:
    print("0")
elif a >= n:
    print(n)
else:
    x = n // (a + b)
    if x == 0:
        print(a)
    else:
        if (n - ((a + b) * x)) >= a:
            print((a * x + a))
        else:
            print((a * x + (n - (a + b) * x)))

n, a, b = [int(x) for x in input().split()]
if a == 0 and b == 0:
    print("0")
elif a >= n:
    print(n)
else:
    x = n // (a + b)
    if x == 0:
        print(a)
    else:
        if (n - ((a + b) * x)) >= a:
            print((a * x + a))
        else:
            print((n - b * x))

-            print((a * x + (n - (a + b) * x))) +            print((n - b * x))