//package AtCoder.ABC158;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) {
        long n = in.NL(), b = in.NL(), r = in.NL();
        if (r==0 && b==0) {
            out.println(0);
        } else if (b==0) {
            out.println(0);
        } else if (r==0) {
            out.println(n);
        } else {
            long div = n/(r+b);
            long ans = 0;
            ans = ans + div * b;
            long rem = n % (r+b);
            ans = ans + Long.min(rem, b);
            out.println(ans);
        }
        out.close();
    }

    static InputStream inputStream = System.in;
    static OutputStream outputStream = System.out;
    static InputReader in = new InputReader(inputStream);
    static PrintWriter out = new PrintWriter(outputStream);

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int NI() {
            return Integer.parseInt(next());
        }

        public long NL() {
            return Long.parseLong(next());
        }

    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.OutputStream; OutputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.StringTokenizer; StringTokenizer java.util public class Main {

    public static void main(String[] args) {
        long n = in.NL(), b = in.NL(), r = in.NL();
        if (r==0 && b==0) {
            out.println(0);
        } else if (b==0) {
            out.println(0);
        } else if (r==0) {
            out.println(n);
        } else {
            long div = n/(r+b);
            long ans = 0;
            ans = ans + div * b;
            long rem = n % (r+b);
            ans = ans + Long.min(rem, b);
            out.println(ans);
        }
        out.close();
    }

    static InputStream inputStream = System.in;
    static OutputStream outputStream = System.out;
    static InputReader in = new InputReader(inputStream);
    static PrintWriter out = new PrintWriter(outputStream);

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int NI() {
            return Integer.parseInt(next());
        }

        public long NL() {
            return Long.parseLong(next());
        }

    }
} Main static InputStream inputStream = System.in; inputStream System.in System System.in static OutputStream outputStream = System.out; outputStream System.out System System.out static InputReader in = new InputReader(inputStream); in new InputReader(inputStream) static PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) public static void main(String[] args) {
        long n = in.NL(), b = in.NL(), r = in.NL();
        if (r==0 && b==0) {
            out.println(0);
        } else if (b==0) {
            out.println(0);
        } else if (r==0) {
            out.println(n);
        } else {
            long div = n/(r+b);
            long ans = 0;
            ans = ans + div * b;
            long rem = n % (r+b);
            ans = ans + Long.min(rem, b);
            out.println(ans);
        }
        out.close();
    } main {
        long n = in.NL(), b = in.NL(), r = in.NL();
        if (r==0 && b==0) {
            out.println(0);
        } else if (b==0) {
            out.println(0);
        } else if (r==0) {
            out.println(n);
        } else {
            long div = n/(r+b);
            long ans = 0;
            ans = ans + div * b;
            long rem = n % (r+b);
            ans = ans + Long.min(rem, b);
            out.println(ans);
        }
        out.close();
    } long n = in.NL() n in.NL() in.NL in b = in.NL() b in.NL() in.NL in r = in.NL(); r in.NL() in.NL in if (r==0 && b==0) {
            out.println(0);
        } else if (b==0) {
            out.println(0);
        } else if (r==0) {
            out.println(n);
        } else {
            long div = n/(r+b);
            long ans = 0;
            ans = ans + div * b;
            long rem = n % (r+b);
            ans = ans + Long.min(rem, b);
            out.println(ans);
        } r==0 && b==0 r==0 r 0 b==0 b 0 {
            out.println(0);
        } out.println(0) out.println out 0 if (b==0) {
            out.println(0);
        } else if (r==0) {
            out.println(n);
        } else {
            long div = n/(r+b);
            long ans = 0;
            ans = ans + div * b;
            long rem = n % (r+b);
            ans = ans + Long.min(rem, b);
            out.println(ans);
        } b==0 b 0 {
            out.println(0);
        } out.println(0) out.println out 0 if (r==0) {
            out.println(n);
        } else {
            long div = n/(r+b);
            long ans = 0;
            ans = ans + div * b;
            long rem = n % (r+b);
            ans = ans + Long.min(rem, b);
            out.println(ans);
        } r==0 r 0 {
            out.println(n);
        } out.println(n) out.println out n {
            long div = n/(r+b);
            long ans = 0;
            ans = ans + div * b;
            long rem = n % (r+b);
            ans = ans + Long.min(rem, b);
            out.println(ans);
        } long div = n/(r+b); div n/(r+b) n (r+b) r b long ans = 0; ans 0 ans = ans + div * b ans ans + div * b ans div * b div b long rem = n % (r+b); rem n % (r+b) n (r+b) r b ans = ans + Long.min(rem, b) ans ans + Long.min(rem, b) ans Long.min(rem, b) Long.min Long rem b out.println(ans) out.println out ans out.close() out.close out String[] args args static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int NI() {
            return Integer.parseInt(next());
        }

        public long NL() {
            return Long.parseLong(next());
        }

    } InputReader public BufferedReader reader; reader public StringTokenizer tokenizer; tokenizer public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        } InputReader {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        } reader = new BufferedReader(new InputStreamReader(stream), 32768) reader new BufferedReader(new InputStreamReader(stream), 32768) tokenizer = null tokenizer null InputStream stream stream public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        } next {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        } while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } tokenizer == null || !tokenizer.hasMoreTokens() tokenizer == null tokenizer null !tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } IOException e {
                    throw new RuntimeException(e);
                } throw new RuntimeException(e); new RuntimeException(e) {
                    tokenizer = new StringTokenizer(reader.readLine());
                } tokenizer = new StringTokenizer(reader.readLine()) tokenizer new StringTokenizer(reader.readLine()) return tokenizer.nextToken(); tokenizer.nextToken() tokenizer.nextToken tokenizer public int NI() {
            return Integer.parseInt(next());
        } NI {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public long NL() {
            return Long.parseLong(next());
        } NL {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public class Main {

    public static void main(String[] args) {
        long n = in.NL(), b = in.NL(), r = in.NL();
        if (r==0 && b==0) {
            out.println(0);
        } else if (b==0) {
            out.println(0);
        } else if (r==0) {
            out.println(n);
        } else {
            long div = n/(r+b);
            long ans = 0;
            ans = ans + div * b;
            long rem = n % (r+b);
            ans = ans + Long.min(rem, b);
            out.println(ans);
        }
        out.close();
    }

    static InputStream inputStream = System.in;
    static OutputStream outputStream = System.out;
    static InputReader in = new InputReader(inputStream);
    static PrintWriter out = new PrintWriter(outputStream);

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int NI() {
            return Integer.parseInt(next());
        }

        public long NL() {
            return Long.parseLong(next());
        }

    }
} public class Main {

    public static void main(String[] args) {
        long n = in.NL(), b = in.NL(), r = in.NL();
        if (r==0 && b==0) {
            out.println(0);
        } else if (b==0) {
            out.println(0);
        } else if (r==0) {
            out.println(n);
        } else {
            long div = n/(r+b);
            long ans = 0;
            ans = ans + div * b;
            long rem = n % (r+b);
            ans = ans + Long.min(rem, b);
            out.println(ans);
        }
        out.close();
    }

    static InputStream inputStream = System.in;
    static OutputStream outputStream = System.out;
    static InputReader in = new InputReader(inputStream);
    static PrintWriter out = new PrintWriter(outputStream);

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int NI() {
            return Integer.parseInt(next());
        }

        public long NL() {
            return Long.parseLong(next());
        }

    }
} Main
//package AtCoder.ABC158;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) {
        long n = in.NL(), b = in.NL(), r = in.NL();
        if (r==0 && b==0) {
            out.println(0);
        } else if (b==0) {
            out.println(0);
        } else if (r==0) {
            out.println(n);
        } else {
            long div = n/(r+b);
            long ans = 0;
            ans = ans + div * b;
            long rem = n % (r+b);
            ans = ans + Long.min(rem, b);
            out.println(ans);
        }
        out.close();
    }

    static InputStream inputStream = System.in;
    static OutputStream outputStream = System.out;
    static InputReader in = new InputReader(inputStream);
    static PrintWriter out = new PrintWriter(outputStream);

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int NI() {
            return Integer.parseInt(next());
        }

        public long NL() {
            return Long.parseLong(next());
        }

    }
}