Imports System

Module Program
    Sub Main(args As String())
        Dim tmpA As String() = Split(Console.ReadLine(), " ")

        Dim N As Long = CLng(tmpA(0))
        Dim A As Long = CLng(tmpA(1))
        Dim B As Long = CLng(tmpA(2))

        Dim i As Long = 0
        Dim j As Long = 0

        i = N \ (A + B)
        j = N Mod (A + B)

        If j < A Then
            Console.WriteLine(i * A + j)
        Else
            Console.WriteLine(i * A + A)
        End If
    End Sub
End Module
