import java.util.*;

public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		long N= keyboard.nextLong();
		long A = keyboard.nextLong();
		long B = keyboard.nextLong();
		
		long ans = 0;
		
		if(N%(A+B) == 0) {
			ans = N/(A+B)*A;
		}else if(N%(A+B) <= A) {
			ans = N/(A+B)*A+N%(A+B);
		}else{
			ans = N/(A+B)*A+A;
		}
		
		System.out.print(ans);
		keyboard.close();	
		
	}
} import java.util.*; util.* java public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		long N= keyboard.nextLong();
		long A = keyboard.nextLong();
		long B = keyboard.nextLong();
		
		long ans = 0;
		
		if(N%(A+B) == 0) {
			ans = N/(A+B)*A;
		}else if(N%(A+B) <= A) {
			ans = N/(A+B)*A+N%(A+B);
		}else{
			ans = N/(A+B)*A+A;
		}
		
		System.out.print(ans);
		keyboard.close();	
		
	}
} Main public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		long N= keyboard.nextLong();
		long A = keyboard.nextLong();
		long B = keyboard.nextLong();
		
		long ans = 0;
		
		if(N%(A+B) == 0) {
			ans = N/(A+B)*A;
		}else if(N%(A+B) <= A) {
			ans = N/(A+B)*A+N%(A+B);
		}else{
			ans = N/(A+B)*A+A;
		}
		
		System.out.print(ans);
		keyboard.close();	
		
	} main {
		
		Scanner keyboard = new Scanner(System.in); 
		
		long N= keyboard.nextLong();
		long A = keyboard.nextLong();
		long B = keyboard.nextLong();
		
		long ans = 0;
		
		if(N%(A+B) == 0) {
			ans = N/(A+B)*A;
		}else if(N%(A+B) <= A) {
			ans = N/(A+B)*A+N%(A+B);
		}else{
			ans = N/(A+B)*A+A;
		}
		
		System.out.print(ans);
		keyboard.close();	
		
	} Scanner keyboard = new Scanner(System.in); keyboard new Scanner(System.in) long N= keyboard.nextLong(); N keyboard.nextLong() keyboard.nextLong keyboard long A = keyboard.nextLong(); A keyboard.nextLong() keyboard.nextLong keyboard long B = keyboard.nextLong(); B keyboard.nextLong() keyboard.nextLong keyboard long ans = 0; ans 0 if(N%(A+B) == 0) {
			ans = N/(A+B)*A;
		}else if(N%(A+B) <= A) {
			ans = N/(A+B)*A+N%(A+B);
		}else{
			ans = N/(A+B)*A+A;
		} N%(A+B) == 0 N%(A+B) N (A+B) A B 0 {
			ans = N/(A+B)*A;
		} ans = N/(A+B)*A ans N/(A+B)*A N/(A+B) N (A+B) A B A if(N%(A+B) <= A) {
			ans = N/(A+B)*A+N%(A+B);
		}else{
			ans = N/(A+B)*A+A;
		} N%(A+B) <= A N%(A+B) N (A+B) A B A {
			ans = N/(A+B)*A+N%(A+B);
		} ans = N/(A+B)*A+N%(A+B) ans N/(A+B)*A+N%(A+B) N/(A+B)*A N/(A+B) N (A+B) A B A N%(A+B) N (A+B) A B {
			ans = N/(A+B)*A+A;
		} ans = N/(A+B)*A+A ans N/(A+B)*A+A N/(A+B)*A N/(A+B) N (A+B) A B A A System.out.print(ans) System.out.print System.out System System.out ans keyboard.close() keyboard.close keyboard String[] args args public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		long N= keyboard.nextLong();
		long A = keyboard.nextLong();
		long B = keyboard.nextLong();
		
		long ans = 0;
		
		if(N%(A+B) == 0) {
			ans = N/(A+B)*A;
		}else if(N%(A+B) <= A) {
			ans = N/(A+B)*A+N%(A+B);
		}else{
			ans = N/(A+B)*A+A;
		}
		
		System.out.print(ans);
		keyboard.close();	
		
	}
} public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		long N= keyboard.nextLong();
		long A = keyboard.nextLong();
		long B = keyboard.nextLong();
		
		long ans = 0;
		
		if(N%(A+B) == 0) {
			ans = N/(A+B)*A;
		}else if(N%(A+B) <= A) {
			ans = N/(A+B)*A+N%(A+B);
		}else{
			ans = N/(A+B)*A+A;
		}
		
		System.out.print(ans);
		keyboard.close();	
		
	}
} Main
import java.util.*;

public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		long N= keyboard.nextLong();
		long A = keyboard.nextLong();
		long B = keyboard.nextLong();
		
		long ans = 0;
		
		if(N%(A+B) == 0) {
			ans = N/(A+B)*A;
		}else if(N%(A+B) <= A) {
			ans = N/(A+B)*A+N%(A+B);
		}else{
			ans = N/(A+B)*A+A;
		}
		
		System.out.print(ans);
		keyboard.close();	
		
	}
}
