import java.math.BigInteger;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		BigInteger N = BigInteger.valueOf(sc.nextLong());
		BigInteger A = BigInteger.valueOf(sc.nextLong());
		BigInteger B = BigInteger.valueOf(sc.nextLong());
		BigInteger APlusB = A.add(B);
		BigInteger dev = N.divide(APlusB);
		BigInteger mul = dev.multiply(A);
		BigInteger rem = N.remainder(APlusB);
		BigInteger total = BigInteger.valueOf(0);
		
		if (rem.equals(0)) {
			total = mul;
		} else if (rem.compareTo(A) >= 1) {
			total = mul.add(A);
		} else {
			total = mul.add(rem);
		}
		
		System.out.println(total);
	}
}	 import java.math.BigInteger; BigInteger java.math import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		BigInteger N = BigInteger.valueOf(sc.nextLong());
		BigInteger A = BigInteger.valueOf(sc.nextLong());
		BigInteger B = BigInteger.valueOf(sc.nextLong());
		BigInteger APlusB = A.add(B);
		BigInteger dev = N.divide(APlusB);
		BigInteger mul = dev.multiply(A);
		BigInteger rem = N.remainder(APlusB);
		BigInteger total = BigInteger.valueOf(0);
		
		if (rem.equals(0)) {
			total = mul;
		} else if (rem.compareTo(A) >= 1) {
			total = mul.add(A);
		} else {
			total = mul.add(rem);
		}
		
		System.out.println(total);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		BigInteger N = BigInteger.valueOf(sc.nextLong());
		BigInteger A = BigInteger.valueOf(sc.nextLong());
		BigInteger B = BigInteger.valueOf(sc.nextLong());
		BigInteger APlusB = A.add(B);
		BigInteger dev = N.divide(APlusB);
		BigInteger mul = dev.multiply(A);
		BigInteger rem = N.remainder(APlusB);
		BigInteger total = BigInteger.valueOf(0);
		
		if (rem.equals(0)) {
			total = mul;
		} else if (rem.compareTo(A) >= 1) {
			total = mul.add(A);
		} else {
			total = mul.add(rem);
		}
		
		System.out.println(total);
	} main {
		Scanner sc = new Scanner(System.in);
		BigInteger N = BigInteger.valueOf(sc.nextLong());
		BigInteger A = BigInteger.valueOf(sc.nextLong());
		BigInteger B = BigInteger.valueOf(sc.nextLong());
		BigInteger APlusB = A.add(B);
		BigInteger dev = N.divide(APlusB);
		BigInteger mul = dev.multiply(A);
		BigInteger rem = N.remainder(APlusB);
		BigInteger total = BigInteger.valueOf(0);
		
		if (rem.equals(0)) {
			total = mul;
		} else if (rem.compareTo(A) >= 1) {
			total = mul.add(A);
		} else {
			total = mul.add(rem);
		}
		
		System.out.println(total);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) BigInteger N = BigInteger.valueOf(sc.nextLong()); N BigInteger.valueOf(sc.nextLong()) BigInteger.valueOf BigInteger sc.nextLong() sc.nextLong sc BigInteger A = BigInteger.valueOf(sc.nextLong()); A BigInteger.valueOf(sc.nextLong()) BigInteger.valueOf BigInteger sc.nextLong() sc.nextLong sc BigInteger B = BigInteger.valueOf(sc.nextLong()); B BigInteger.valueOf(sc.nextLong()) BigInteger.valueOf BigInteger sc.nextLong() sc.nextLong sc BigInteger APlusB = A.add(B); APlusB A.add(B) A.add A B BigInteger dev = N.divide(APlusB); dev N.divide(APlusB) N.divide N APlusB BigInteger mul = dev.multiply(A); mul dev.multiply(A) dev.multiply dev A BigInteger rem = N.remainder(APlusB); rem N.remainder(APlusB) N.remainder N APlusB BigInteger total = BigInteger.valueOf(0); total BigInteger.valueOf(0) BigInteger.valueOf BigInteger 0 if (rem.equals(0)) {
			total = mul;
		} else if (rem.compareTo(A) >= 1) {
			total = mul.add(A);
		} else {
			total = mul.add(rem);
		} rem.equals(0) rem.equals rem 0 {
			total = mul;
		} total = mul total mul if (rem.compareTo(A) >= 1) {
			total = mul.add(A);
		} else {
			total = mul.add(rem);
		} rem.compareTo(A) >= 1 rem.compareTo(A) rem.compareTo rem A 1 {
			total = mul.add(A);
		} total = mul.add(A) total mul.add(A) mul.add mul A {
			total = mul.add(rem);
		} total = mul.add(rem) total mul.add(rem) mul.add mul rem System.out.println(total) System.out.println System.out System System.out total String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		BigInteger N = BigInteger.valueOf(sc.nextLong());
		BigInteger A = BigInteger.valueOf(sc.nextLong());
		BigInteger B = BigInteger.valueOf(sc.nextLong());
		BigInteger APlusB = A.add(B);
		BigInteger dev = N.divide(APlusB);
		BigInteger mul = dev.multiply(A);
		BigInteger rem = N.remainder(APlusB);
		BigInteger total = BigInteger.valueOf(0);
		
		if (rem.equals(0)) {
			total = mul;
		} else if (rem.compareTo(A) >= 1) {
			total = mul.add(A);
		} else {
			total = mul.add(rem);
		}
		
		System.out.println(total);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		BigInteger N = BigInteger.valueOf(sc.nextLong());
		BigInteger A = BigInteger.valueOf(sc.nextLong());
		BigInteger B = BigInteger.valueOf(sc.nextLong());
		BigInteger APlusB = A.add(B);
		BigInteger dev = N.divide(APlusB);
		BigInteger mul = dev.multiply(A);
		BigInteger rem = N.remainder(APlusB);
		BigInteger total = BigInteger.valueOf(0);
		
		if (rem.equals(0)) {
			total = mul;
		} else if (rem.compareTo(A) >= 1) {
			total = mul.add(A);
		} else {
			total = mul.add(rem);
		}
		
		System.out.println(total);
	}
} Main
import java.math.BigInteger;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		BigInteger N = BigInteger.valueOf(sc.nextLong());
		BigInteger A = BigInteger.valueOf(sc.nextLong());
		BigInteger B = BigInteger.valueOf(sc.nextLong());
		BigInteger APlusB = A.add(B);
		BigInteger dev = N.divide(APlusB);
		BigInteger mul = dev.multiply(A);
		BigInteger rem = N.remainder(APlusB);
		BigInteger total = BigInteger.valueOf(0);
		
		if (rem.equals(0)) {
			total = mul;
		} else if (rem.compareTo(A) >= 1) {
			total = mul.add(A);
		} else {
			total = mul.add(rem);
		}
		
		System.out.println(total);
	}
}	