import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Scanner;

/**
 * TITLE : Count Balls
 * URL : https://atcoder.jp/contests/abc158/tasks/abc158_b
 */
public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String N = sc.next();
        String A = sc.next();
        String B = sc.next();
        BigDecimal NBC = new BigDecimal(N);
        BigDecimal ABC = new BigDecimal(A);
        BigDecimal BBC = new BigDecimal(B);

        BigDecimal answer = NBC.divide(ABC.add(BBC), 0, RoundingMode.DOWN).multiply(ABC);
        if (ABC.compareTo(NBC.remainder(ABC.add(BBC))) >= 0) {
            answer = answer.add(NBC.remainder(ABC.add(BBC)));
        } else {
            answer = answer.add(ABC);
        }
        System.out.println(answer.toString());
        sc.close();
    }
} import java.math.BigDecimal; BigDecimal java.math import java.math.RoundingMode; RoundingMode java.math import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String N = sc.next();
        String A = sc.next();
        String B = sc.next();
        BigDecimal NBC = new BigDecimal(N);
        BigDecimal ABC = new BigDecimal(A);
        BigDecimal BBC = new BigDecimal(B);

        BigDecimal answer = NBC.divide(ABC.add(BBC), 0, RoundingMode.DOWN).multiply(ABC);
        if (ABC.compareTo(NBC.remainder(ABC.add(BBC))) >= 0) {
            answer = answer.add(NBC.remainder(ABC.add(BBC)));
        } else {
            answer = answer.add(ABC);
        }
        System.out.println(answer.toString());
        sc.close();
    }
} Main public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String N = sc.next();
        String A = sc.next();
        String B = sc.next();
        BigDecimal NBC = new BigDecimal(N);
        BigDecimal ABC = new BigDecimal(A);
        BigDecimal BBC = new BigDecimal(B);

        BigDecimal answer = NBC.divide(ABC.add(BBC), 0, RoundingMode.DOWN).multiply(ABC);
        if (ABC.compareTo(NBC.remainder(ABC.add(BBC))) >= 0) {
            answer = answer.add(NBC.remainder(ABC.add(BBC)));
        } else {
            answer = answer.add(ABC);
        }
        System.out.println(answer.toString());
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        String N = sc.next();
        String A = sc.next();
        String B = sc.next();
        BigDecimal NBC = new BigDecimal(N);
        BigDecimal ABC = new BigDecimal(A);
        BigDecimal BBC = new BigDecimal(B);

        BigDecimal answer = NBC.divide(ABC.add(BBC), 0, RoundingMode.DOWN).multiply(ABC);
        if (ABC.compareTo(NBC.remainder(ABC.add(BBC))) >= 0) {
            answer = answer.add(NBC.remainder(ABC.add(BBC)));
        } else {
            answer = answer.add(ABC);
        }
        System.out.println(answer.toString());
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String N = sc.next(); N sc.next() sc.next sc String A = sc.next(); A sc.next() sc.next sc String B = sc.next(); B sc.next() sc.next sc BigDecimal NBC = new BigDecimal(N); NBC new BigDecimal(N) BigDecimal ABC = new BigDecimal(A); ABC new BigDecimal(A) BigDecimal BBC = new BigDecimal(B); BBC new BigDecimal(B) BigDecimal answer = NBC.divide(ABC.add(BBC), 0, RoundingMode.DOWN).multiply(ABC); answer NBC.divide(ABC.add(BBC), 0, RoundingMode.DOWN).multiply(ABC) NBC.divide(ABC.add(BBC), 0, RoundingMode.DOWN).multiply NBC.divide(ABC.add(BBC), 0, RoundingMode.DOWN) NBC.divide NBC ABC.add(BBC) ABC.add ABC BBC 0 RoundingMode.DOWN RoundingMode RoundingMode.DOWN ABC if (ABC.compareTo(NBC.remainder(ABC.add(BBC))) >= 0) {
            answer = answer.add(NBC.remainder(ABC.add(BBC)));
        } else {
            answer = answer.add(ABC);
        } ABC.compareTo(NBC.remainder(ABC.add(BBC))) >= 0 ABC.compareTo(NBC.remainder(ABC.add(BBC))) ABC.compareTo ABC NBC.remainder(ABC.add(BBC)) NBC.remainder NBC ABC.add(BBC) ABC.add ABC BBC 0 {
            answer = answer.add(NBC.remainder(ABC.add(BBC)));
        } answer = answer.add(NBC.remainder(ABC.add(BBC))) answer answer.add(NBC.remainder(ABC.add(BBC))) answer.add answer NBC.remainder(ABC.add(BBC)) NBC.remainder NBC ABC.add(BBC) ABC.add ABC BBC {
            answer = answer.add(ABC);
        } answer = answer.add(ABC) answer answer.add(ABC) answer.add answer ABC System.out.println(answer.toString()) System.out.println System.out System System.out answer.toString() answer.toString answer sc.close() sc.close sc String args[] args public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String N = sc.next();
        String A = sc.next();
        String B = sc.next();
        BigDecimal NBC = new BigDecimal(N);
        BigDecimal ABC = new BigDecimal(A);
        BigDecimal BBC = new BigDecimal(B);

        BigDecimal answer = NBC.divide(ABC.add(BBC), 0, RoundingMode.DOWN).multiply(ABC);
        if (ABC.compareTo(NBC.remainder(ABC.add(BBC))) >= 0) {
            answer = answer.add(NBC.remainder(ABC.add(BBC)));
        } else {
            answer = answer.add(ABC);
        }
        System.out.println(answer.toString());
        sc.close();
    }
} public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String N = sc.next();
        String A = sc.next();
        String B = sc.next();
        BigDecimal NBC = new BigDecimal(N);
        BigDecimal ABC = new BigDecimal(A);
        BigDecimal BBC = new BigDecimal(B);

        BigDecimal answer = NBC.divide(ABC.add(BBC), 0, RoundingMode.DOWN).multiply(ABC);
        if (ABC.compareTo(NBC.remainder(ABC.add(BBC))) >= 0) {
            answer = answer.add(NBC.remainder(ABC.add(BBC)));
        } else {
            answer = answer.add(ABC);
        }
        System.out.println(answer.toString());
        sc.close();
    }
} Main
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Scanner;

/**
 * TITLE : Count Balls
 * URL : https://atcoder.jp/contests/abc158/tasks/abc158_b
 */
public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String N = sc.next();
        String A = sc.next();
        String B = sc.next();
        BigDecimal NBC = new BigDecimal(N);
        BigDecimal ABC = new BigDecimal(A);
        BigDecimal BBC = new BigDecimal(B);

        BigDecimal answer = NBC.divide(ABC.add(BBC), 0, RoundingMode.DOWN).multiply(ABC);
        if (ABC.compareTo(NBC.remainder(ABC.add(BBC))) >= 0) {
            answer = answer.add(NBC.remainder(ABC.add(BBC)));
        } else {
            answer = answer.add(ABC);
        }
        System.out.println(answer.toString());
        sc.close();
    }
}