import java.util.Scanner;
import java.lang.Math;

class Main{

    public static void main(String[] args){

        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long a = scanner.nextLong();
        long b = scanner.nextLong();
        scanner.close();

        long result1 = n/(a+b)*a;
        long result2 = n%(a+b);
        if(result2>=a){
            System.out.println(result1+a);
            return;
        }else{
            System.out.println(result1+result2);
            return;
        }

    }
} import java.util.Scanner; Scanner java.util import java.lang.Math; Math java.lang class Main{

    public static void main(String[] args){

        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long a = scanner.nextLong();
        long b = scanner.nextLong();
        scanner.close();

        long result1 = n/(a+b)*a;
        long result2 = n%(a+b);
        if(result2>=a){
            System.out.println(result1+a);
            return;
        }else{
            System.out.println(result1+result2);
            return;
        }

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

        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long a = scanner.nextLong();
        long b = scanner.nextLong();
        scanner.close();

        long result1 = n/(a+b)*a;
        long result2 = n%(a+b);
        if(result2>=a){
            System.out.println(result1+a);
            return;
        }else{
            System.out.println(result1+result2);
            return;
        }

    } main {

        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long a = scanner.nextLong();
        long b = scanner.nextLong();
        scanner.close();

        long result1 = n/(a+b)*a;
        long result2 = n%(a+b);
        if(result2>=a){
            System.out.println(result1+a);
            return;
        }else{
            System.out.println(result1+result2);
            return;
        }

    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long n = scanner.nextLong(); n scanner.nextLong() scanner.nextLong scanner long a = scanner.nextLong(); a scanner.nextLong() scanner.nextLong scanner long b = scanner.nextLong(); b scanner.nextLong() scanner.nextLong scanner scanner.close() scanner.close scanner long result1 = n/(a+b)*a; result1 n/(a+b)*a n/(a+b) n (a+b) a b a long result2 = n%(a+b); result2 n%(a+b) n (a+b) a b if(result2>=a){
            System.out.println(result1+a);
            return;
        }else{
            System.out.println(result1+result2);
            return;
        } result2>=a result2 a {
            System.out.println(result1+a);
            return;
        } System.out.println(result1+a) System.out.println System.out System System.out result1+a result1 a return; {
            System.out.println(result1+result2);
            return;
        } System.out.println(result1+result2) System.out.println System.out System System.out result1+result2 result1 result2 return; String[] args args
import java.util.Scanner;
import java.lang.Math;

class Main{

    public static void main(String[] args){

        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long a = scanner.nextLong();
        long b = scanner.nextLong();
        scanner.close();

        long result1 = n/(a+b)*a;
        long result2 = n%(a+b);
        if(result2>=a){
            System.out.println(result1+a);
            return;
        }else{
            System.out.println(result1+result2);
            return;
        }

    }
}