Module B
    Sub Main()
        Dim input As String = Console.ReadLine()
        Dim arr() As String = Split(input, " ")
        Dim n, a, b As Long
        n = arr(0) : a = arr(1) : b = arr(2)
        Dim cnt As Long = n / (a + b)
        Dim zan As Long = n - (a + b) * cnt
        Console.WriteLine(If(zan > a, cnt * a + a, cnt * a + zan))
    End Sub
End Module