import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		long N = Long.parseLong(scan.next());
		long A = Long.parseLong(scan.next());
		long B = Long.parseLong(scan.next());
		scan.close();

		long total = A + B;

		long shou = N / total;
		long amari = N % total;

		long AA = shou * A;
		if (amari <= A) {
			AA += amari;
		} else {
			AA += A;
		}

		System.out.println(AA);

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		long N = Long.parseLong(scan.next());
		long A = Long.parseLong(scan.next());
		long B = Long.parseLong(scan.next());
		scan.close();

		long total = A + B;

		long shou = N / total;
		long amari = N % total;

		long AA = shou * A;
		if (amari <= A) {
			AA += amari;
		} else {
			AA += A;
		}

		System.out.println(AA);

	}

} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		long N = Long.parseLong(scan.next());
		long A = Long.parseLong(scan.next());
		long B = Long.parseLong(scan.next());
		scan.close();

		long total = A + B;

		long shou = N / total;
		long amari = N % total;

		long AA = shou * A;
		if (amari <= A) {
			AA += amari;
		} else {
			AA += A;
		}

		System.out.println(AA);

	} main {

		Scanner scan = new Scanner(System.in);
		long N = Long.parseLong(scan.next());
		long A = Long.parseLong(scan.next());
		long B = Long.parseLong(scan.next());
		scan.close();

		long total = A + B;

		long shou = N / total;
		long amari = N % total;

		long AA = shou * A;
		if (amari <= A) {
			AA += amari;
		} else {
			AA += A;
		}

		System.out.println(AA);

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long N = Long.parseLong(scan.next()); N Long.parseLong(scan.next()) Long.parseLong Long scan.next() scan.next scan long A = Long.parseLong(scan.next()); A Long.parseLong(scan.next()) Long.parseLong Long scan.next() scan.next scan long B = Long.parseLong(scan.next()); B Long.parseLong(scan.next()) Long.parseLong Long scan.next() scan.next scan scan.close() scan.close scan long total = A + B; total A + B A B long shou = N / total; shou N / total N total long amari = N % total; amari N % total N total long AA = shou * A; AA shou * A shou A if (amari <= A) {
			AA += amari;
		} else {
			AA += A;
		} amari <= A amari A {
			AA += amari;
		} AA += amari AA amari {
			AA += A;
		} AA += A AA A System.out.println(AA) System.out.println System.out System System.out AA String[] args args public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		long N = Long.parseLong(scan.next());
		long A = Long.parseLong(scan.next());
		long B = Long.parseLong(scan.next());
		scan.close();

		long total = A + B;

		long shou = N / total;
		long amari = N % total;

		long AA = shou * A;
		if (amari <= A) {
			AA += amari;
		} else {
			AA += A;
		}

		System.out.println(AA);

	}

} public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		long N = Long.parseLong(scan.next());
		long A = Long.parseLong(scan.next());
		long B = Long.parseLong(scan.next());
		scan.close();

		long total = A + B;

		long shou = N / total;
		long amari = N % total;

		long AA = shou * A;
		if (amari <= A) {
			AA += amari;
		} else {
			AA += A;
		}

		System.out.println(AA);

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		long N = Long.parseLong(scan.next());
		long A = Long.parseLong(scan.next());
		long B = Long.parseLong(scan.next());
		scan.close();

		long total = A + B;

		long shou = N / total;
		long amari = N % total;

		long AA = shou * A;
		if (amari <= A) {
			AA += amari;
		} else {
			AA += A;
		}

		System.out.println(AA);

	}

}