import java.util.Scanner;

class Main{
	
	public static void main(String args[]){
      
	  Scanner scanner = new Scanner(System.in);
      String input = scanner.nextLine();
      
	  String nums[] = input.split(" ");
	  
	  long blue = Long.parseLong(nums[1]);
	  long red = Long.parseLong(nums[2]);
	  long sum = Long.parseLong(nums[0]);
	  
	  long count = sum / (blue + red);
	  long amari = sum % (blue + red);
	  
	  if(amari < blue){
	    System.out.println((count * blue)+amari);
	  }else{
	    System.out.println((count * blue)+blue);
	  }
	  
	}
} import java.util.Scanner; Scanner java.util class Main{
	
	public static void main(String args[]){
      
	  Scanner scanner = new Scanner(System.in);
      String input = scanner.nextLine();
      
	  String nums[] = input.split(" ");
	  
	  long blue = Long.parseLong(nums[1]);
	  long red = Long.parseLong(nums[2]);
	  long sum = Long.parseLong(nums[0]);
	  
	  long count = sum / (blue + red);
	  long amari = sum % (blue + red);
	  
	  if(amari < blue){
	    System.out.println((count * blue)+amari);
	  }else{
	    System.out.println((count * blue)+blue);
	  }
	  
	}
} Main public static void main(String args[]){
      
	  Scanner scanner = new Scanner(System.in);
      String input = scanner.nextLine();
      
	  String nums[] = input.split(" ");
	  
	  long blue = Long.parseLong(nums[1]);
	  long red = Long.parseLong(nums[2]);
	  long sum = Long.parseLong(nums[0]);
	  
	  long count = sum / (blue + red);
	  long amari = sum % (blue + red);
	  
	  if(amari < blue){
	    System.out.println((count * blue)+amari);
	  }else{
	    System.out.println((count * blue)+blue);
	  }
	  
	} main {
      
	  Scanner scanner = new Scanner(System.in);
      String input = scanner.nextLine();
      
	  String nums[] = input.split(" ");
	  
	  long blue = Long.parseLong(nums[1]);
	  long red = Long.parseLong(nums[2]);
	  long sum = Long.parseLong(nums[0]);
	  
	  long count = sum / (blue + red);
	  long amari = sum % (blue + red);
	  
	  if(amari < blue){
	    System.out.println((count * blue)+amari);
	  }else{
	    System.out.println((count * blue)+blue);
	  }
	  
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String input = scanner.nextLine(); input scanner.nextLine() scanner.nextLine scanner String nums[] = input.split(" "); nums input.split(" ") input.split input " " long blue = Long.parseLong(nums[1]); blue Long.parseLong(nums[1]) Long.parseLong Long nums[1] nums 1 long red = Long.parseLong(nums[2]); red Long.parseLong(nums[2]) Long.parseLong Long nums[2] nums 2 long sum = Long.parseLong(nums[0]); sum Long.parseLong(nums[0]) Long.parseLong Long nums[0] nums 0 long count = sum / (blue + red); count sum / (blue + red) sum (blue + red) blue red long amari = sum % (blue + red); amari sum % (blue + red) sum (blue + red) blue red if(amari < blue){
	    System.out.println((count * blue)+amari);
	  }else{
	    System.out.println((count * blue)+blue);
	  } amari < blue amari blue {
	    System.out.println((count * blue)+amari);
	  } System.out.println((count * blue)+amari) System.out.println System.out System System.out (count * blue)+amari (count * blue) count blue amari {
	    System.out.println((count * blue)+blue);
	  } System.out.println((count * blue)+blue) System.out.println System.out System System.out (count * blue)+blue (count * blue) count blue blue String args[] args
import java.util.Scanner;

class Main{
	
	public static void main(String args[]){
      
	  Scanner scanner = new Scanner(System.in);
      String input = scanner.nextLine();
      
	  String nums[] = input.split(" ");
	  
	  long blue = Long.parseLong(nums[1]);
	  long red = Long.parseLong(nums[2]);
	  long sum = Long.parseLong(nums[0]);
	  
	  long count = sum / (blue + red);
	  long amari = sum % (blue + red);
	  
	  if(amari < blue){
	    System.out.println((count * blue)+amari);
	  }else{
	    System.out.println((count * blue)+blue);
	  }
	  
	}
}
