import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            long n = Long.parseLong(in.next());
            long a = Long.parseLong(in.next());
            long b = Long.parseLong(in.next());

            long rep = n / (a + b);
            long am = n % (a + b);

            long add = 0;
            if (am > a) {
                add = a;
            } else {
                add = am;
            }

            out.println(rep * a + add);
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            long n = Long.parseLong(in.next());
            long a = Long.parseLong(in.next());
            long b = Long.parseLong(in.next());

            long rep = n / (a + b);
            long am = n % (a + b);

            long add = 0;
            if (am > a) {
                add = a;
            } else {
                add = am;
            }

            out.println(rep * a + add);
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) B solver = new B(); solver new B() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            long n = Long.parseLong(in.next());
            long a = Long.parseLong(in.next());
            long b = Long.parseLong(in.next());

            long rep = n / (a + b);
            long am = n % (a + b);

            long add = 0;
            if (am > a) {
                add = a;
            } else {
                add = am;
            }

            out.println(rep * a + add);
        }

    } B public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            long n = Long.parseLong(in.next());
            long a = Long.parseLong(in.next());
            long b = Long.parseLong(in.next());

            long rep = n / (a + b);
            long am = n % (a + b);

            long add = 0;
            if (am > a) {
                add = a;
            } else {
                add = am;
            }

            out.println(rep * a + add);
        } solve {
            // 入力
            long n = Long.parseLong(in.next());
            long a = Long.parseLong(in.next());
            long b = Long.parseLong(in.next());

            long rep = n / (a + b);
            long am = n % (a + b);

            long add = 0;
            if (am > a) {
                add = a;
            } else {
                add = am;
            }

            out.println(rep * a + add);
        } long n = Long.parseLong(in.next()); n Long.parseLong(in.next()) Long.parseLong Long in.next() in.next in long a = Long.parseLong(in.next()); a Long.parseLong(in.next()) Long.parseLong Long in.next() in.next in long b = Long.parseLong(in.next()); b Long.parseLong(in.next()) Long.parseLong Long in.next() in.next in long rep = n / (a + b); rep n / (a + b) n (a + b) a b long am = n % (a + b); am n % (a + b) n (a + b) a b long add = 0; add 0 if (am > a) {
                add = a;
            } else {
                add = am;
            } am > a am a {
                add = a;
            } add = a add a {
                add = am;
            } add = am add am out.println(rep * a + add) out.println out rep * a + add rep * a rep a add int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            long n = Long.parseLong(in.next());
            long a = Long.parseLong(in.next());
            long b = Long.parseLong(in.next());

            long rep = n / (a + b);
            long am = n % (a + b);

            long add = 0;
            if (am > a) {
                add = a;
            } else {
                add = am;
            }

            out.println(rep * a + add);
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            long n = Long.parseLong(in.next());
            long a = Long.parseLong(in.next());
            long b = Long.parseLong(in.next());

            long rep = n / (a + b);
            long am = n % (a + b);

            long add = 0;
            if (am > a) {
                add = a;
            } else {
                add = am;
            }

            out.println(rep * a + add);
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            long n = Long.parseLong(in.next());
            long a = Long.parseLong(in.next());
            long b = Long.parseLong(in.next());

            long rep = n / (a + b);
            long am = n % (a + b);

            long add = 0;
            if (am > a) {
                add = a;
            } else {
                add = am;
            }

            out.println(rep * a + add);
        }

    }
}

