import java.util.*;

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

        long N = sc.nextLong();
        long b = sc.nextLong();
        if (b == 0) {
            System.out.println(0);
            return;
        }
        long r = sc.nextLong();

        long x = N / (r + b);
        long ans = b * x;
        long mod = N % (r + b);
        System.out.println(ans + Math.min(mod, b));
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long N = sc.nextLong();
        long b = sc.nextLong();
        if (b == 0) {
            System.out.println(0);
            return;
        }
        long r = sc.nextLong();

        long x = N / (r + b);
        long ans = b * x;
        long mod = N % (r + b);
        System.out.println(ans + Math.min(mod, b));
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long N = sc.nextLong();
        long b = sc.nextLong();
        if (b == 0) {
            System.out.println(0);
            return;
        }
        long r = sc.nextLong();

        long x = N / (r + b);
        long ans = b * x;
        long mod = N % (r + b);
        System.out.println(ans + Math.min(mod, b));
    } main {
        Scanner sc = new Scanner(System.in);

        long N = sc.nextLong();
        long b = sc.nextLong();
        if (b == 0) {
            System.out.println(0);
            return;
        }
        long r = sc.nextLong();

        long x = N / (r + b);
        long ans = b * x;
        long mod = N % (r + b);
        System.out.println(ans + Math.min(mod, b));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc long b = sc.nextLong(); b sc.nextLong() sc.nextLong sc if (b == 0) {
            System.out.println(0);
            return;
        } b == 0 b 0 {
            System.out.println(0);
            return;
        } System.out.println(0) System.out.println System.out System System.out 0 return; long r = sc.nextLong(); r sc.nextLong() sc.nextLong sc long x = N / (r + b); x N / (r + b) N (r + b) r b long ans = b * x; ans b * x b x long mod = N % (r + b); mod N % (r + b) N (r + b) r b System.out.println(ans + Math.min(mod, b)) System.out.println System.out System System.out ans + Math.min(mod, b) ans Math.min(mod, b) Math.min Math mod b String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long N = sc.nextLong();
        long b = sc.nextLong();
        if (b == 0) {
            System.out.println(0);
            return;
        }
        long r = sc.nextLong();

        long x = N / (r + b);
        long ans = b * x;
        long mod = N % (r + b);
        System.out.println(ans + Math.min(mod, b));
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long N = sc.nextLong();
        long b = sc.nextLong();
        if (b == 0) {
            System.out.println(0);
            return;
        }
        long r = sc.nextLong();

        long x = N / (r + b);
        long ans = b * x;
        long mod = N % (r + b);
        System.out.println(ans + Math.min(mod, b));
    }
} Main
import java.util.*;

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

        long N = sc.nextLong();
        long b = sc.nextLong();
        if (b == 0) {
            System.out.println(0);
            return;
        }
        long r = sc.nextLong();

        long x = N / (r + b);
        long ans = b * x;
        long mod = N % (r + b);
        System.out.println(ans + Math.min(mod, b));
    }
}
