import java.util.Scanner;
import java.util.Arrays;
class Main{
public static void main(String[] args){
 Scanner scan = new Scanner(System.in);
 
long N = scan.nextLong();
long A = scan.nextLong();
long B = scan.nextLong(); 
long amari = 0;
long blue = 0;
long a = N / (A + B);
 amari = N % (A + B);
  if(amari > A){
    blue = A * (a + 1);
  }
  else {
    blue = amari + (A * a);
  }
  System.out.println(blue);
 }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util class Main{
public static void main(String[] args){
 Scanner scan = new Scanner(System.in);
 
long N = scan.nextLong();
long A = scan.nextLong();
long B = scan.nextLong(); 
long amari = 0;
long blue = 0;
long a = N / (A + B);
 amari = N % (A + B);
  if(amari > A){
    blue = A * (a + 1);
  }
  else {
    blue = amari + (A * a);
  }
  System.out.println(blue);
 }
} Main public static void main(String[] args){
 Scanner scan = new Scanner(System.in);
 
long N = scan.nextLong();
long A = scan.nextLong();
long B = scan.nextLong(); 
long amari = 0;
long blue = 0;
long a = N / (A + B);
 amari = N % (A + B);
  if(amari > A){
    blue = A * (a + 1);
  }
  else {
    blue = amari + (A * a);
  }
  System.out.println(blue);
 } main {
 Scanner scan = new Scanner(System.in);
 
long N = scan.nextLong();
long A = scan.nextLong();
long B = scan.nextLong(); 
long amari = 0;
long blue = 0;
long a = N / (A + B);
 amari = N % (A + B);
  if(amari > A){
    blue = A * (a + 1);
  }
  else {
    blue = amari + (A * a);
  }
  System.out.println(blue);
 } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long N = scan.nextLong(); N scan.nextLong() scan.nextLong scan long A = scan.nextLong(); A scan.nextLong() scan.nextLong scan long B = scan.nextLong(); B scan.nextLong() scan.nextLong scan long amari = 0; amari 0 long blue = 0; blue 0 long a = N / (A + B); a N / (A + B) N (A + B) A B amari = N % (A + B) amari N % (A + B) N (A + B) A B if(amari > A){
    blue = A * (a + 1);
  }
  else {
    blue = amari + (A * a);
  } amari > A amari A {
    blue = A * (a + 1);
  } blue = A * (a + 1) blue A * (a + 1) A (a + 1) a 1 {
    blue = amari + (A * a);
  } blue = amari + (A * a) blue amari + (A * a) amari (A * a) A a System.out.println(blue) System.out.println System.out System System.out blue String[] args args
import java.util.Scanner;
import java.util.Arrays;
class Main{
public static void main(String[] args){
 Scanner scan = new Scanner(System.in);
 
long N = scan.nextLong();
long A = scan.nextLong();
long B = scan.nextLong(); 
long amari = 0;
long blue = 0;
long a = N / (A + B);
 amari = N % (A + B);
  if(amari > A){
    blue = A * (a + 1);
  }
  else {
    blue = amari + (A * a);
  }
  System.out.println(blue);
 }
}