import java.util.Scanner;

fun main (args : Array<String>) {
  val input = Scanner(System.`in`)
  
  while (input.hasNext()) {
    val N = input.nextLong()
    val A = input.nextLong()
    val B = input.nextLong()
    
    val group = N / (A + B)
    var remain = Math.min(N % (A + B), A)
    
    println(group * A + remain)
  }
}