# import bisect

# from collections import Counter, deque

# import copy

# from heapq import heappush, heappop, heapify

# from fractions import gcd

# import itertools

# from operator import attrgetter, itemgetter

# import math



import sys



# import numpy as np



ipti = sys.stdin.readline

MOD = 10 ** 9 + 7

INF = float('INF')

sys.setrecursionlimit(10 ** 5)



def main():

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

    ab = a + b



    c = n // ab

    d = n % ab



    ans = c * a + min(a, d)

    print(ans)



if __name__ == '__main__':

    main()
n, blue, red = list(map(int, input().split()))



# n / (blue + red) = quot ... rem

quot = n // (blue + red)  # 商 quotient

rem = n % (blue + red)  # 余り remainder



ans = blue * quot + min(blue, rem)



print(ans)
# import bisect
# from collections import Counter, deque
# import copy
# from heapq import heappush, heappop, heapify
# from fractions import gcd
# import itertools
# from operator import attrgetter, itemgetter
# import math
import sys

# import numpy as np
ipti = sys.stdin.readline
MOD = 10**9 + 7
INF = float("INF")
sys.setrecursionlimit(10**5)


def main():
    n, a, b = list(map(int, ipti().split()))
    ab = a + b
    c = n // ab
    d = n % ab
    ans = c * a + min(a, d)
    print(ans)


if __name__ == "__main__":
    main()

n, blue, red = list(map(int, input().split()))
# n / (blue + red) = quot ... rem
quot = n // (blue + red)  # 商 quotient
rem = n % (blue + red)  # 余り remainder
ans = blue * quot + min(blue, rem)
print(ans)

-# import bisect -# from collections import Counter, deque -# import copy -# from heapq import heappush, heappop, heapify -# from fractions import gcd -# import itertools -# from operator import attrgetter, itemgetter -# import math -import sys - -# import numpy as np -ipti = sys.stdin.readline -MOD = 10**9 + 7 -INF = float("INF") -sys.setrecursionlimit(10**5) - - -def main(): -    n, a, b = list(map(int, ipti().split())) -    ab = a + b -    c = n // ab -    d = n % ab -    ans = c * a + min(a, d) -    print(ans) - - -if __name__ == "__main__": -    main() +n, blue, red = list(map(int, input().split())) +# n / (blue + red) = quot ... rem +quot = n // (blue + red)  # 商 quotient +rem = n % (blue + red)  # 余り remainder +ans = blue * quot + min(blue, rem) +print(ans)