if __name__ == '__main__':

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

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

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

    print((ans+m))
if __name__ == '__main__':

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

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

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

    print(ans)
if __name__ == "__main__":
    (n, a, b) = list(map(int, input().split()))
    ans = (n // (a + b)) * a
    m = min(n % (a + b), a)
    print((ans + m))

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

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