import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);

        long length = scanner.nextLong();
        long blue = scanner.nextLong();
        long red = scanner.nextLong();

        long sum = blue + red;
        long div = length / sum;
        long rem = length % sum;

        long blueCount = (div * blue);

        if (rem > 0) {
            blueCount += Math.min(rem, blue);
        }
        System.out.println(blueCount);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);

        long length = scanner.nextLong();
        long blue = scanner.nextLong();
        long red = scanner.nextLong();

        long sum = blue + red;
        long div = length / sum;
        long rem = length % sum;

        long blueCount = (div * blue);

        if (rem > 0) {
            blueCount += Math.min(rem, blue);
        }
        System.out.println(blueCount);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);

        long length = scanner.nextLong();
        long blue = scanner.nextLong();
        long red = scanner.nextLong();

        long sum = blue + red;
        long div = length / sum;
        long rem = length % sum;

        long blueCount = (div * blue);

        if (rem > 0) {
            blueCount += Math.min(rem, blue);
        }
        System.out.println(blueCount);
    } main {
        Scanner scanner = new Scanner(System.in);

        long length = scanner.nextLong();
        long blue = scanner.nextLong();
        long red = scanner.nextLong();

        long sum = blue + red;
        long div = length / sum;
        long rem = length % sum;

        long blueCount = (div * blue);

        if (rem > 0) {
            blueCount += Math.min(rem, blue);
        }
        System.out.println(blueCount);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long length = scanner.nextLong(); length scanner.nextLong() scanner.nextLong scanner long blue = scanner.nextLong(); blue scanner.nextLong() scanner.nextLong scanner long red = scanner.nextLong(); red scanner.nextLong() scanner.nextLong scanner long sum = blue + red; sum blue + red blue red long div = length / sum; div length / sum length sum long rem = length % sum; rem length % sum length sum long blueCount = (div * blue); blueCount (div * blue) div blue if (rem > 0) {
            blueCount += Math.min(rem, blue);
        } rem > 0 rem 0 {
            blueCount += Math.min(rem, blue);
        } blueCount += Math.min(rem, blue) blueCount Math.min(rem, blue) Math.min Math rem blue System.out.println(blueCount) System.out.println System.out System System.out blueCount String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);

        long length = scanner.nextLong();
        long blue = scanner.nextLong();
        long red = scanner.nextLong();

        long sum = blue + red;
        long div = length / sum;
        long rem = length % sum;

        long blueCount = (div * blue);

        if (rem > 0) {
            blueCount += Math.min(rem, blue);
        }
        System.out.println(blueCount);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);

        long length = scanner.nextLong();
        long blue = scanner.nextLong();
        long red = scanner.nextLong();

        long sum = blue + red;
        long div = length / sum;
        long rem = length % sum;

        long blueCount = (div * blue);

        if (rem > 0) {
            blueCount += Math.min(rem, blue);
        }
        System.out.println(blueCount);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);

        long length = scanner.nextLong();
        long blue = scanner.nextLong();
        long red = scanner.nextLong();

        long sum = blue + red;
        long div = length / sum;
        long rem = length % sum;

        long blueCount = (div * blue);

        if (rem > 0) {
            blueCount += Math.min(rem, blue);
        }
        System.out.println(blueCount);
    }
}