import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = Long.parseLong(sc.next());
        long a = Long.parseLong(sc.next());
        long b = Long.parseLong(sc.next());
        if (a == 0) {
            System.out.println(0);
            return;
        } else if (b == 0) {
            System.out.println(n);
            return;
        }
        long ans = n / (a + b);
        long mod = n % (a + b);
        ans *= a;
        ans += mod <= a ? mod : a;
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = Long.parseLong(sc.next());
        long a = Long.parseLong(sc.next());
        long b = Long.parseLong(sc.next());
        if (a == 0) {
            System.out.println(0);
            return;
        } else if (b == 0) {
            System.out.println(n);
            return;
        }
        long ans = n / (a + b);
        long mod = n % (a + b);
        ans *= a;
        ans += mod <= a ? mod : a;
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = Long.parseLong(sc.next());
        long a = Long.parseLong(sc.next());
        long b = Long.parseLong(sc.next());
        if (a == 0) {
            System.out.println(0);
            return;
        } else if (b == 0) {
            System.out.println(n);
            return;
        }
        long ans = n / (a + b);
        long mod = n % (a + b);
        ans *= a;
        ans += mod <= a ? mod : a;
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        long n = Long.parseLong(sc.next());
        long a = Long.parseLong(sc.next());
        long b = Long.parseLong(sc.next());
        if (a == 0) {
            System.out.println(0);
            return;
        } else if (b == 0) {
            System.out.println(n);
            return;
        }
        long ans = n / (a + b);
        long mod = n % (a + b);
        ans *= a;
        ans += mod <= a ? mod : a;
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = Long.parseLong(sc.next()); n Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc long a = Long.parseLong(sc.next()); a Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc long b = Long.parseLong(sc.next()); b Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc if (a == 0) {
            System.out.println(0);
            return;
        } else if (b == 0) {
            System.out.println(n);
            return;
        } a == 0 a 0 {
            System.out.println(0);
            return;
        } System.out.println(0) System.out.println System.out System System.out 0 return; if (b == 0) {
            System.out.println(n);
            return;
        } b == 0 b 0 {
            System.out.println(n);
            return;
        } System.out.println(n) System.out.println System.out System System.out n return; long ans = n / (a + b); ans n / (a + b) n (a + b) a b long mod = n % (a + b); mod n % (a + b) n (a + b) a b ans *= a ans a ans += mod <= a ? mod : a ans mod <= a ? mod : a mod <= a mod a mod a System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = Long.parseLong(sc.next());
        long a = Long.parseLong(sc.next());
        long b = Long.parseLong(sc.next());
        if (a == 0) {
            System.out.println(0);
            return;
        } else if (b == 0) {
            System.out.println(n);
            return;
        }
        long ans = n / (a + b);
        long mod = n % (a + b);
        ans *= a;
        ans += mod <= a ? mod : a;
        System.out.println(ans);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = Long.parseLong(sc.next());
        long a = Long.parseLong(sc.next());
        long b = Long.parseLong(sc.next());
        if (a == 0) {
            System.out.println(0);
            return;
        } else if (b == 0) {
            System.out.println(n);
            return;
        }
        long ans = n / (a + b);
        long mod = n % (a + b);
        ans *= a;
        ans += mod <= a ? mod : a;
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = Long.parseLong(sc.next());
        long a = Long.parseLong(sc.next());
        long b = Long.parseLong(sc.next());
        if (a == 0) {
            System.out.println(0);
            return;
        } else if (b == 0) {
            System.out.println(n);
            return;
        }
        long ans = n / (a + b);
        long mod = n % (a + b);
        ans *= a;
        ans += mod <= a ? mod : a;
        System.out.println(ans);
    }
}