import math

from collections import deque

def main():

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



    if b == 0:

        print(n)

    else:

        t = a+b

        res = (n // t)*a+min(n%t,a) 

        print(res)

if __name__ == "__main__":

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



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



ans += min(n%(a+b),a)



print(ans)
import math
from collections import deque


def main():
    n, a, b = tuple([int(t) for t in input().split()])
    if b == 0:
        print(n)
    else:
        t = a + b
        res = (n // t) * a + min(n % t, a)
        print(res)


if __name__ == "__main__":
    main()

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

-import math -from collections import deque - - -def main(): -    n, a, b = tuple([int(t) for t in input().split()]) -    if b == 0: -        print(n) -    else: -        t = a + b -        res = (n // t) * a + min(n % t, a) -        print(res) - - -if __name__ == "__main__": -    main() +n, a, b = tuple(map(int, input().split())) +ans = n // (a + b) * a +ans += min(n % (a + b), a) +print(ans)