import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		long N = scan.nextLong();
		long b = scan.nextLong();
		long r = scan.nextLong();
		long res = N / (b+ r);
		long mod = N % (b+ r);

		if(mod > b){
			mod = b;
		}
		System.out.println(res*b + mod);

	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		long N = scan.nextLong();
		long b = scan.nextLong();
		long r = scan.nextLong();
		long res = N / (b+ r);
		long mod = N % (b+ r);

		if(mod > b){
			mod = b;
		}
		System.out.println(res*b + mod);

	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		long N = scan.nextLong();
		long b = scan.nextLong();
		long r = scan.nextLong();
		long res = N / (b+ r);
		long mod = N % (b+ r);

		if(mod > b){
			mod = b;
		}
		System.out.println(res*b + mod);

	} main {
		Scanner scan = new Scanner(System.in);
		long N = scan.nextLong();
		long b = scan.nextLong();
		long r = scan.nextLong();
		long res = N / (b+ r);
		long mod = N % (b+ r);

		if(mod > b){
			mod = b;
		}
		System.out.println(res*b + mod);

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long N = scan.nextLong(); N scan.nextLong() scan.nextLong scan long b = scan.nextLong(); b scan.nextLong() scan.nextLong scan long r = scan.nextLong(); r scan.nextLong() scan.nextLong scan long res = N / (b+ r); res N / (b+ r) N (b+ r) b r long mod = N % (b+ r); mod N % (b+ r) N (b+ r) b r if(mod > b){
			mod = b;
		} mod > b mod b {
			mod = b;
		} mod = b mod b System.out.println(res*b + mod) System.out.println System.out System System.out res*b + mod res*b res b mod String[] args args public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		long N = scan.nextLong();
		long b = scan.nextLong();
		long r = scan.nextLong();
		long res = N / (b+ r);
		long mod = N % (b+ r);

		if(mod > b){
			mod = b;
		}
		System.out.println(res*b + mod);

	}
} public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		long N = scan.nextLong();
		long b = scan.nextLong();
		long r = scan.nextLong();
		long res = N / (b+ r);
		long mod = N % (b+ r);

		if(mod > b){
			mod = b;
		}
		System.out.println(res*b + mod);

	}
} Main
import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		long N = scan.nextLong();
		long b = scan.nextLong();
		long r = scan.nextLong();
		long res = N / (b+ r);
		long mod = N % (b+ r);

		if(mod > b){
			mod = b;
		}
		System.out.println(res*b + mod);

	}
}