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 = new BigInteger(sc.next());
		BigInteger A = new BigInteger(sc.next());
		BigInteger B = new BigInteger(sc.next());

		BigInteger sum = A.add(B);
		BigInteger setCount = N.divide(sum);
		BigInteger remain = N.remainder(sum);

		BigInteger result = A.multiply(setCount);
		if (remain.compareTo(A) >= 0) {
			result = result.add(A);
		} else {
			result = result.add(remain);
		}

		System.out.println(result);

		sc.close();
	}
} 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 = new BigInteger(sc.next());
		BigInteger A = new BigInteger(sc.next());
		BigInteger B = new BigInteger(sc.next());

		BigInteger sum = A.add(B);
		BigInteger setCount = N.divide(sum);
		BigInteger remain = N.remainder(sum);

		BigInteger result = A.multiply(setCount);
		if (remain.compareTo(A) >= 0) {
			result = result.add(A);
		} else {
			result = result.add(remain);
		}

		System.out.println(result);

		sc.close();
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		BigInteger N = new BigInteger(sc.next());
		BigInteger A = new BigInteger(sc.next());
		BigInteger B = new BigInteger(sc.next());

		BigInteger sum = A.add(B);
		BigInteger setCount = N.divide(sum);
		BigInteger remain = N.remainder(sum);

		BigInteger result = A.multiply(setCount);
		if (remain.compareTo(A) >= 0) {
			result = result.add(A);
		} else {
			result = result.add(remain);
		}

		System.out.println(result);

		sc.close();
	} main {

		Scanner sc = new Scanner(System.in);

		BigInteger N = new BigInteger(sc.next());
		BigInteger A = new BigInteger(sc.next());
		BigInteger B = new BigInteger(sc.next());

		BigInteger sum = A.add(B);
		BigInteger setCount = N.divide(sum);
		BigInteger remain = N.remainder(sum);

		BigInteger result = A.multiply(setCount);
		if (remain.compareTo(A) >= 0) {
			result = result.add(A);
		} else {
			result = result.add(remain);
		}

		System.out.println(result);

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) BigInteger N = new BigInteger(sc.next()); N new BigInteger(sc.next()) BigInteger A = new BigInteger(sc.next()); A new BigInteger(sc.next()) BigInteger B = new BigInteger(sc.next()); B new BigInteger(sc.next()) BigInteger sum = A.add(B); sum A.add(B) A.add A B BigInteger setCount = N.divide(sum); setCount N.divide(sum) N.divide N sum BigInteger remain = N.remainder(sum); remain N.remainder(sum) N.remainder N sum BigInteger result = A.multiply(setCount); result A.multiply(setCount) A.multiply A setCount if (remain.compareTo(A) >= 0) {
			result = result.add(A);
		} else {
			result = result.add(remain);
		} remain.compareTo(A) >= 0 remain.compareTo(A) remain.compareTo remain A 0 {
			result = result.add(A);
		} result = result.add(A) result result.add(A) result.add result A {
			result = result.add(remain);
		} result = result.add(remain) result result.add(remain) result.add result remain System.out.println(result) System.out.println System.out System System.out result sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		BigInteger N = new BigInteger(sc.next());
		BigInteger A = new BigInteger(sc.next());
		BigInteger B = new BigInteger(sc.next());

		BigInteger sum = A.add(B);
		BigInteger setCount = N.divide(sum);
		BigInteger remain = N.remainder(sum);

		BigInteger result = A.multiply(setCount);
		if (remain.compareTo(A) >= 0) {
			result = result.add(A);
		} else {
			result = result.add(remain);
		}

		System.out.println(result);

		sc.close();
	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		BigInteger N = new BigInteger(sc.next());
		BigInteger A = new BigInteger(sc.next());
		BigInteger B = new BigInteger(sc.next());

		BigInteger sum = A.add(B);
		BigInteger setCount = N.divide(sum);
		BigInteger remain = N.remainder(sum);

		BigInteger result = A.multiply(setCount);
		if (remain.compareTo(A) >= 0) {
			result = result.add(A);
		} else {
			result = result.add(remain);
		}

		System.out.println(result);

		sc.close();
	}
} 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 = new BigInteger(sc.next());
		BigInteger A = new BigInteger(sc.next());
		BigInteger B = new BigInteger(sc.next());

		BigInteger sum = A.add(B);
		BigInteger setCount = N.divide(sum);
		BigInteger remain = N.remainder(sum);

		BigInteger result = A.multiply(setCount);
		if (remain.compareTo(A) >= 0) {
			result = result.add(A);
		} else {
			result = result.add(remain);
		}

		System.out.println(result);

		sc.close();
	}
}
