import java.util.Scanner;

public class Main {
	public static void main(String args[]) {
		Scanner scan = new Scanner(System.in);
		long all = scan.nextLong(), blue = scan.nextLong(), red = scan.nextLong();
		long count = 0;
		
		count = blue * (all / (blue + red));
		
		if(all % (blue + red) <= blue) {
			count += all %(blue + red);
			
		}else {
			count += blue;
			
		}
		
		System.out.println(count);
		
	}
	
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String args[]) {
		Scanner scan = new Scanner(System.in);
		long all = scan.nextLong(), blue = scan.nextLong(), red = scan.nextLong();
		long count = 0;
		
		count = blue * (all / (blue + red));
		
		if(all % (blue + red) <= blue) {
			count += all %(blue + red);
			
		}else {
			count += blue;
			
		}
		
		System.out.println(count);
		
	}
	
} Main public static void main(String args[]) {
		Scanner scan = new Scanner(System.in);
		long all = scan.nextLong(), blue = scan.nextLong(), red = scan.nextLong();
		long count = 0;
		
		count = blue * (all / (blue + red));
		
		if(all % (blue + red) <= blue) {
			count += all %(blue + red);
			
		}else {
			count += blue;
			
		}
		
		System.out.println(count);
		
	} main {
		Scanner scan = new Scanner(System.in);
		long all = scan.nextLong(), blue = scan.nextLong(), red = scan.nextLong();
		long count = 0;
		
		count = blue * (all / (blue + red));
		
		if(all % (blue + red) <= blue) {
			count += all %(blue + red);
			
		}else {
			count += blue;
			
		}
		
		System.out.println(count);
		
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long all = scan.nextLong() all scan.nextLong() scan.nextLong scan blue = scan.nextLong() blue scan.nextLong() scan.nextLong scan red = scan.nextLong(); red scan.nextLong() scan.nextLong scan long count = 0; count 0 count = blue * (all / (blue + red)) count blue * (all / (blue + red)) blue (all / (blue + red)) all (blue + red) blue red if(all % (blue + red) <= blue) {
			count += all %(blue + red);
			
		}else {
			count += blue;
			
		} all % (blue + red) <= blue all % (blue + red) all (blue + red) blue red blue {
			count += all %(blue + red);
			
		} count += all %(blue + red) count all %(blue + red) all (blue + red) blue red {
			count += blue;
			
		} count += blue count blue System.out.println(count) System.out.println System.out System System.out count String args[] args public class Main {
	public static void main(String args[]) {
		Scanner scan = new Scanner(System.in);
		long all = scan.nextLong(), blue = scan.nextLong(), red = scan.nextLong();
		long count = 0;
		
		count = blue * (all / (blue + red));
		
		if(all % (blue + red) <= blue) {
			count += all %(blue + red);
			
		}else {
			count += blue;
			
		}
		
		System.out.println(count);
		
	}
	
} public class Main {
	public static void main(String args[]) {
		Scanner scan = new Scanner(System.in);
		long all = scan.nextLong(), blue = scan.nextLong(), red = scan.nextLong();
		long count = 0;
		
		count = blue * (all / (blue + red));
		
		if(all % (blue + red) <= blue) {
			count += all %(blue + red);
			
		}else {
			count += blue;
			
		}
		
		System.out.println(count);
		
	}
	
} Main
import java.util.Scanner;

public class Main {
	public static void main(String args[]) {
		Scanner scan = new Scanner(System.in);
		long all = scan.nextLong(), blue = scan.nextLong(), red = scan.nextLong();
		long count = 0;
		
		count = blue * (all / (blue + red));
		
		if(all % (blue + red) <= blue) {
			count += all %(blue + red);
			
		}else {
			count += blue;
			
		}
		
		System.out.println(count);
		
	}
	
}