def main():

    N, A, B = (int(i) for i in input().split())

    ans = (N//(A+B)) * A

    less = N - (N//(A+B)) * (A+B)

    print((ans + min(less, A)))





if __name__ == '__main__':

    main()

def main():

    N, A, B = (int(i) for i in input().split())

    ans = (N//(A+B)) * A

    print((ans + min(N % (A+B), A)))





if __name__ == '__main__':

    main()

def main():
    N, A, B = (int(i) for i in input().split())
    ans = (N // (A + B)) * A
    less = N - (N // (A + B)) * (A + B)
    print((ans + min(less, A)))


if __name__ == "__main__":
    main()

def main():
    N, A, B = (int(i) for i in input().split())
    ans = (N // (A + B)) * A
    print((ans + min(N % (A + B), A)))


if __name__ == "__main__":
    main()

-    less = N - (N // (A + B)) * (A + B) -    print((ans + min(less, A))) +    print((ans + min(N % (A + B), A)))