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 = sc.nextBigInteger();
        BigInteger a = sc.nextBigInteger();
        BigInteger r = sc.nextBigInteger();

        BigInteger sum = a.add(r);
        BigInteger ans = n.divide(sum);
        BigInteger amari = n.remainder(sum);

        if (a.compareTo(amari)==-1) {
            System.out.println(a.multiply(ans).add(a));
        }else{
            System.out.println(a.multiply(ans).add(amari));
        }
    }
} 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 = sc.nextBigInteger();
        BigInteger a = sc.nextBigInteger();
        BigInteger r = sc.nextBigInteger();

        BigInteger sum = a.add(r);
        BigInteger ans = n.divide(sum);
        BigInteger amari = n.remainder(sum);

        if (a.compareTo(amari)==-1) {
            System.out.println(a.multiply(ans).add(a));
        }else{
            System.out.println(a.multiply(ans).add(amari));
        }
    }
} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        BigInteger n = sc.nextBigInteger();
        BigInteger a = sc.nextBigInteger();
        BigInteger r = sc.nextBigInteger();

        BigInteger sum = a.add(r);
        BigInteger ans = n.divide(sum);
        BigInteger amari = n.remainder(sum);

        if (a.compareTo(amari)==-1) {
            System.out.println(a.multiply(ans).add(a));
        }else{
            System.out.println(a.multiply(ans).add(amari));
        }
    } main {

        Scanner sc = new Scanner(System.in);
        BigInteger n = sc.nextBigInteger();
        BigInteger a = sc.nextBigInteger();
        BigInteger r = sc.nextBigInteger();

        BigInteger sum = a.add(r);
        BigInteger ans = n.divide(sum);
        BigInteger amari = n.remainder(sum);

        if (a.compareTo(amari)==-1) {
            System.out.println(a.multiply(ans).add(a));
        }else{
            System.out.println(a.multiply(ans).add(amari));
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) BigInteger n = sc.nextBigInteger(); n sc.nextBigInteger() sc.nextBigInteger sc BigInteger a = sc.nextBigInteger(); a sc.nextBigInteger() sc.nextBigInteger sc BigInteger r = sc.nextBigInteger(); r sc.nextBigInteger() sc.nextBigInteger sc BigInteger sum = a.add(r); sum a.add(r) a.add a r BigInteger ans = n.divide(sum); ans n.divide(sum) n.divide n sum BigInteger amari = n.remainder(sum); amari n.remainder(sum) n.remainder n sum if (a.compareTo(amari)==-1) {
            System.out.println(a.multiply(ans).add(a));
        }else{
            System.out.println(a.multiply(ans).add(amari));
        } a.compareTo(amari)==-1 a.compareTo(amari) a.compareTo a amari -1 1 {
            System.out.println(a.multiply(ans).add(a));
        } System.out.println(a.multiply(ans).add(a)) System.out.println System.out System System.out a.multiply(ans).add(a) a.multiply(ans).add a.multiply(ans) a.multiply a ans a {
            System.out.println(a.multiply(ans).add(amari));
        } System.out.println(a.multiply(ans).add(amari)) System.out.println System.out System System.out a.multiply(ans).add(amari) a.multiply(ans).add a.multiply(ans) a.multiply a ans amari String[] args args public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        BigInteger n = sc.nextBigInteger();
        BigInteger a = sc.nextBigInteger();
        BigInteger r = sc.nextBigInteger();

        BigInteger sum = a.add(r);
        BigInteger ans = n.divide(sum);
        BigInteger amari = n.remainder(sum);

        if (a.compareTo(amari)==-1) {
            System.out.println(a.multiply(ans).add(a));
        }else{
            System.out.println(a.multiply(ans).add(amari));
        }
    }
} public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        BigInteger n = sc.nextBigInteger();
        BigInteger a = sc.nextBigInteger();
        BigInteger r = sc.nextBigInteger();

        BigInteger sum = a.add(r);
        BigInteger ans = n.divide(sum);
        BigInteger amari = n.remainder(sum);

        if (a.compareTo(amari)==-1) {
            System.out.println(a.multiply(ans).add(a));
        }else{
            System.out.println(a.multiply(ans).add(amari));
        }
    }
} 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 = sc.nextBigInteger();
        BigInteger a = sc.nextBigInteger();
        BigInteger r = sc.nextBigInteger();

        BigInteger sum = a.add(r);
        BigInteger ans = n.divide(sum);
        BigInteger amari = n.remainder(sum);

        if (a.compareTo(amari)==-1) {
            System.out.println(a.multiply(ans).add(a));
        }else{
            System.out.println(a.multiply(ans).add(amari));
        }
    }
}
