import sys



sr = lambda: sys.stdin.readline().rstrip()

ir = lambda: int(sr())

lr = lambda: list(map(int, sr().split()))



N, A, B = lr()

time, remain = divmod(N, (A+B))

answer = A * time + min(A, remain)

print(answer)

# coding: utf-8

import sys



sr = lambda: sys.stdin.readline().rstrip()

ir = lambda: int(sr())

lr = lambda: list(map(int, sr().split()))



N, A, B = lr()

time = N // (A+B)

remain = N - (A+B) * time

answer = A * time + min(A, remain)

print(answer)

import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
N, A, B = lr()
time, remain = divmod(N, (A + B))
answer = A * time + min(A, remain)
print(answer)

# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
N, A, B = lr()
time = N // (A + B)
remain = N - (A + B) * time
answer = A * time + min(A, remain)
print(answer)

+# coding: utf-8 -time, remain = divmod(N, (A + B)) +time = N // (A + B) +remain = N - (A + B) * time