

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        long n = Long.parseLong(scan.next());
        long blue = Long.parseLong(scan.next());
        long red = Long.parseLong(scan.next());
        scan.close();

        long total = blue + red;

        long syo = n / total;
        long amari = n % total;

        long answer = syo * blue;
        if (amari <= blue) {
            answer += amari;
        } else {
            answer += blue;
        }

        System.out.println(answer);
    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        long n = Long.parseLong(scan.next());
        long blue = Long.parseLong(scan.next());
        long red = Long.parseLong(scan.next());
        scan.close();

        long total = blue + red;

        long syo = n / total;
        long amari = n % total;

        long answer = syo * blue;
        if (amari <= blue) {
            answer += amari;
        } else {
            answer += blue;
        }

        System.out.println(answer);
    }

} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        long n = Long.parseLong(scan.next());
        long blue = Long.parseLong(scan.next());
        long red = Long.parseLong(scan.next());
        scan.close();

        long total = blue + red;

        long syo = n / total;
        long amari = n % total;

        long answer = syo * blue;
        if (amari <= blue) {
            answer += amari;
        } else {
            answer += blue;
        }

        System.out.println(answer);
    } main {
        Scanner scan = new Scanner(System.in);
        long n = Long.parseLong(scan.next());
        long blue = Long.parseLong(scan.next());
        long red = Long.parseLong(scan.next());
        scan.close();

        long total = blue + red;

        long syo = n / total;
        long amari = n % total;

        long answer = syo * blue;
        if (amari <= blue) {
            answer += amari;
        } else {
            answer += blue;
        }

        System.out.println(answer);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long n = Long.parseLong(scan.next()); n Long.parseLong(scan.next()) Long.parseLong Long scan.next() scan.next scan long blue = Long.parseLong(scan.next()); blue Long.parseLong(scan.next()) Long.parseLong Long scan.next() scan.next scan long red = Long.parseLong(scan.next()); red Long.parseLong(scan.next()) Long.parseLong Long scan.next() scan.next scan scan.close() scan.close scan long total = blue + red; total blue + red blue red long syo = n / total; syo n / total n total long amari = n % total; amari n % total n total long answer = syo * blue; answer syo * blue syo blue if (amari <= blue) {
            answer += amari;
        } else {
            answer += blue;
        } amari <= blue amari blue {
            answer += amari;
        } answer += amari answer amari {
            answer += blue;
        } answer += blue answer blue System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        long n = Long.parseLong(scan.next());
        long blue = Long.parseLong(scan.next());
        long red = Long.parseLong(scan.next());
        scan.close();

        long total = blue + red;

        long syo = n / total;
        long amari = n % total;

        long answer = syo * blue;
        if (amari <= blue) {
            answer += amari;
        } else {
            answer += blue;
        }

        System.out.println(answer);
    }

} public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        long n = Long.parseLong(scan.next());
        long blue = Long.parseLong(scan.next());
        long red = Long.parseLong(scan.next());
        scan.close();

        long total = blue + red;

        long syo = n / total;
        long amari = n % total;

        long answer = syo * blue;
        if (amari <= blue) {
            answer += amari;
        } else {
            answer += blue;
        }

        System.out.println(answer);
    }

} Main


import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        long n = Long.parseLong(scan.next());
        long blue = Long.parseLong(scan.next());
        long red = Long.parseLong(scan.next());
        scan.close();

        long total = blue + red;

        long syo = n / total;
        long amari = n % total;

        long answer = syo * blue;
        if (amari <= blue) {
            answer += amari;
        } else {
            answer += blue;
        }

        System.out.println(answer);
    }

}
