import java.util.*;
import java.util.Scanner;
class Main{
    public static void main(String[] args)
    {
        long n, a, b;
        long result = 0;
        long flag;
        Scanner scanner = new Scanner(System.in);
        n = scanner.nextLong();
        a = scanner.nextLong();
        b = scanner.nextLong();
        flag = n / (a + b);
        result = a * flag;
        flag = n % (a + b);
        if(flag < a){
            result += flag;
        }else{
            result += a;
        }
        System.out.println(result);
    }
} import java.util.*; util.* java import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args)
    {
        long n, a, b;
        long result = 0;
        long flag;
        Scanner scanner = new Scanner(System.in);
        n = scanner.nextLong();
        a = scanner.nextLong();
        b = scanner.nextLong();
        flag = n / (a + b);
        result = a * flag;
        flag = n % (a + b);
        if(flag < a){
            result += flag;
        }else{
            result += a;
        }
        System.out.println(result);
    }
} Main public static void main(String[] args)
    {
        long n, a, b;
        long result = 0;
        long flag;
        Scanner scanner = new Scanner(System.in);
        n = scanner.nextLong();
        a = scanner.nextLong();
        b = scanner.nextLong();
        flag = n / (a + b);
        result = a * flag;
        flag = n % (a + b);
        if(flag < a){
            result += flag;
        }else{
            result += a;
        }
        System.out.println(result);
    } main {
        long n, a, b;
        long result = 0;
        long flag;
        Scanner scanner = new Scanner(System.in);
        n = scanner.nextLong();
        a = scanner.nextLong();
        b = scanner.nextLong();
        flag = n / (a + b);
        result = a * flag;
        flag = n % (a + b);
        if(flag < a){
            result += flag;
        }else{
            result += a;
        }
        System.out.println(result);
    } long n n a a b; b long result = 0; result 0 long flag; flag Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) n = scanner.nextLong() n scanner.nextLong() scanner.nextLong scanner a = scanner.nextLong() a scanner.nextLong() scanner.nextLong scanner b = scanner.nextLong() b scanner.nextLong() scanner.nextLong scanner flag = n / (a + b) flag n / (a + b) n (a + b) a b result = a * flag result a * flag a flag flag = n % (a + b) flag n % (a + b) n (a + b) a b if(flag < a){
            result += flag;
        }else{
            result += a;
        } flag < a flag a {
            result += flag;
        } result += flag result flag {
            result += a;
        } result += a result a System.out.println(result) System.out.println System.out System System.out result String[] args args
import java.util.*;
import java.util.Scanner;
class Main{
    public static void main(String[] args)
    {
        long n, a, b;
        long result = 0;
        long flag;
        Scanner scanner = new Scanner(System.in);
        n = scanner.nextLong();
        a = scanner.nextLong();
        b = scanner.nextLong();
        flag = n / (a + b);
        result = a * flag;
        flag = n % (a + b);
        if(flag < a){
            result += flag;
        }else{
            result += a;
        }
        System.out.println(result);
    }
}