import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long n = in.nextLong();
		long a = in.nextLong();
		long b = in.nextLong();
		long syou = n/(a+b);
		long amari = n%(a+b);
		long result = syou*a;
		if(amari >= a) {
			result = result + a;
		} else {
			result = result + amari;
		}
		System.out.println(result);
		in.close();
	}
} import java.util.*; util.* java class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long n = in.nextLong();
		long a = in.nextLong();
		long b = in.nextLong();
		long syou = n/(a+b);
		long amari = n%(a+b);
		long result = syou*a;
		if(amari >= a) {
			result = result + a;
		} else {
			result = result + amari;
		}
		System.out.println(result);
		in.close();
	}
} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long n = in.nextLong();
		long a = in.nextLong();
		long b = in.nextLong();
		long syou = n/(a+b);
		long amari = n%(a+b);
		long result = syou*a;
		if(amari >= a) {
			result = result + a;
		} else {
			result = result + amari;
		}
		System.out.println(result);
		in.close();
	} main {
		Scanner in = new Scanner(System.in);
		long n = in.nextLong();
		long a = in.nextLong();
		long b = in.nextLong();
		long syou = n/(a+b);
		long amari = n%(a+b);
		long result = syou*a;
		if(amari >= a) {
			result = result + a;
		} else {
			result = result + amari;
		}
		System.out.println(result);
		in.close();
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) long n = in.nextLong(); n in.nextLong() in.nextLong in long a = in.nextLong(); a in.nextLong() in.nextLong in long b = in.nextLong(); b in.nextLong() in.nextLong in long syou = n/(a+b); syou n/(a+b) n (a+b) a b long amari = n%(a+b); amari n%(a+b) n (a+b) a b long result = syou*a; result syou*a syou a if(amari >= a) {
			result = result + a;
		} else {
			result = result + amari;
		} amari >= a amari a {
			result = result + a;
		} result = result + a result result + a result a {
			result = result + amari;
		} result = result + amari result result + amari result amari System.out.println(result) System.out.println System.out System System.out result in.close() in.close in String[] args args
import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long n = in.nextLong();
		long a = in.nextLong();
		long b = in.nextLong();
		long syou = n/(a+b);
		long amari = n%(a+b);
		long result = syou*a;
		if(amari >= a) {
			result = result + a;
		} else {
			result = result + amari;
		}
		System.out.println(result);
		in.close();
	}
}
