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(Long.parseLong(sc.next()));
        BigInteger A = BigInteger.valueOf(Long.parseLong(sc.next()));
        BigInteger B = BigInteger.valueOf(Long.parseLong(sc.next()));
        BigInteger num = N.divide(A.add(B));
        BigInteger rem = N.mod(A.add(B));
        if(A.compareTo(rem) == -1){
            System.out.println(num.multiply(A).add(A));
        }else{
            System.out.println(num.multiply(A).add(rem));
        }
    }
} 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(Long.parseLong(sc.next()));
        BigInteger A = BigInteger.valueOf(Long.parseLong(sc.next()));
        BigInteger B = BigInteger.valueOf(Long.parseLong(sc.next()));
        BigInteger num = N.divide(A.add(B));
        BigInteger rem = N.mod(A.add(B));
        if(A.compareTo(rem) == -1){
            System.out.println(num.multiply(A).add(A));
        }else{
            System.out.println(num.multiply(A).add(rem));
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        BigInteger N = BigInteger.valueOf(Long.parseLong(sc.next()));
        BigInteger A = BigInteger.valueOf(Long.parseLong(sc.next()));
        BigInteger B = BigInteger.valueOf(Long.parseLong(sc.next()));
        BigInteger num = N.divide(A.add(B));
        BigInteger rem = N.mod(A.add(B));
        if(A.compareTo(rem) == -1){
            System.out.println(num.multiply(A).add(A));
        }else{
            System.out.println(num.multiply(A).add(rem));
        }
    } main {
        Scanner sc = new Scanner(System.in);
        BigInteger N = BigInteger.valueOf(Long.parseLong(sc.next()));
        BigInteger A = BigInteger.valueOf(Long.parseLong(sc.next()));
        BigInteger B = BigInteger.valueOf(Long.parseLong(sc.next()));
        BigInteger num = N.divide(A.add(B));
        BigInteger rem = N.mod(A.add(B));
        if(A.compareTo(rem) == -1){
            System.out.println(num.multiply(A).add(A));
        }else{
            System.out.println(num.multiply(A).add(rem));
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) BigInteger N = BigInteger.valueOf(Long.parseLong(sc.next())); N BigInteger.valueOf(Long.parseLong(sc.next())) BigInteger.valueOf BigInteger Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc BigInteger A = BigInteger.valueOf(Long.parseLong(sc.next())); A BigInteger.valueOf(Long.parseLong(sc.next())) BigInteger.valueOf BigInteger Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc BigInteger B = BigInteger.valueOf(Long.parseLong(sc.next())); B BigInteger.valueOf(Long.parseLong(sc.next())) BigInteger.valueOf BigInteger Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc BigInteger num = N.divide(A.add(B)); num N.divide(A.add(B)) N.divide N A.add(B) A.add A B BigInteger rem = N.mod(A.add(B)); rem N.mod(A.add(B)) N.mod N A.add(B) A.add A B if(A.compareTo(rem) == -1){
            System.out.println(num.multiply(A).add(A));
        }else{
            System.out.println(num.multiply(A).add(rem));
        } A.compareTo(rem) == -1 A.compareTo(rem) A.compareTo A rem -1 1 {
            System.out.println(num.multiply(A).add(A));
        } System.out.println(num.multiply(A).add(A)) System.out.println System.out System System.out num.multiply(A).add(A) num.multiply(A).add num.multiply(A) num.multiply num A A {
            System.out.println(num.multiply(A).add(rem));
        } System.out.println(num.multiply(A).add(rem)) System.out.println System.out System System.out num.multiply(A).add(rem) num.multiply(A).add num.multiply(A) num.multiply num A rem String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        BigInteger N = BigInteger.valueOf(Long.parseLong(sc.next()));
        BigInteger A = BigInteger.valueOf(Long.parseLong(sc.next()));
        BigInteger B = BigInteger.valueOf(Long.parseLong(sc.next()));
        BigInteger num = N.divide(A.add(B));
        BigInteger rem = N.mod(A.add(B));
        if(A.compareTo(rem) == -1){
            System.out.println(num.multiply(A).add(A));
        }else{
            System.out.println(num.multiply(A).add(rem));
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        BigInteger N = BigInteger.valueOf(Long.parseLong(sc.next()));
        BigInteger A = BigInteger.valueOf(Long.parseLong(sc.next()));
        BigInteger B = BigInteger.valueOf(Long.parseLong(sc.next()));
        BigInteger num = N.divide(A.add(B));
        BigInteger rem = N.mod(A.add(B));
        if(A.compareTo(rem) == -1){
            System.out.println(num.multiply(A).add(A));
        }else{
            System.out.println(num.multiply(A).add(rem));
        }
    }
} 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(Long.parseLong(sc.next()));
        BigInteger A = BigInteger.valueOf(Long.parseLong(sc.next()));
        BigInteger B = BigInteger.valueOf(Long.parseLong(sc.next()));
        BigInteger num = N.divide(A.add(B));
        BigInteger rem = N.mod(A.add(B));
        if(A.compareTo(rem) == -1){
            System.out.println(num.multiply(A).add(A));
        }else{
            System.out.println(num.multiply(A).add(rem));
        }
    }
}