import java.util.*;

public 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();
        long count = (n-n%(a+b))/(a+b);
        long instance = n%(a+b);
        count *= a;
        if (instance<=a){

            count += instance;
        }else{
            count += a;
        }
        System.out.println(count);
    }

} import java.util.*; util.* java public 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();
        long count = (n-n%(a+b))/(a+b);
        long instance = n%(a+b);
        count *= a;
        if (instance<=a){

            count += instance;
        }else{
            count += a;
        }
        System.out.println(count);
    }

} 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();
        long count = (n-n%(a+b))/(a+b);
        long instance = n%(a+b);
        count *= a;
        if (instance<=a){

            count += instance;
        }else{
            count += a;
        }
        System.out.println(count);
    } main {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long a = scanner.nextLong();
        long b = scanner.nextLong();
        long count = (n-n%(a+b))/(a+b);
        long instance = n%(a+b);
        count *= a;
        if (instance<=a){

            count += instance;
        }else{
            count += a;
        }
        System.out.println(count);
    } 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 long count = (n-n%(a+b))/(a+b); count (n-n%(a+b))/(a+b) (n-n%(a+b)) n n%(a+b) n (a+b) a b (a+b) a b long instance = n%(a+b); instance n%(a+b) n (a+b) a b count *= a count a if (instance<=a){

            count += instance;
        }else{
            count += a;
        } instance<=a instance a {

            count += instance;
        } count += instance count instance {
            count += a;
        } count += a count a System.out.println(count) System.out.println System.out System System.out count String[] args args public 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();
        long count = (n-n%(a+b))/(a+b);
        long instance = n%(a+b);
        count *= a;
        if (instance<=a){

            count += instance;
        }else{
            count += a;
        }
        System.out.println(count);
    }

} public 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();
        long count = (n-n%(a+b))/(a+b);
        long instance = n%(a+b);
        count *= a;
        if (instance<=a){

            count += instance;
        }else{
            count += a;
        }
        System.out.println(count);
    }

} Main
import java.util.*;

public 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();
        long count = (n-n%(a+b))/(a+b);
        long instance = n%(a+b);
        count *= a;
        if (instance<=a){

            count += instance;
        }else{
            count += a;
        }
        System.out.println(count);
    }

}